PHPverse 2025

Voting

: three minus two?
(Example: nine)

The Note You're Voting On

uilmind at favor.com.ua
8 years ago
Here is how to make the character in upper case, except HTML-entities:

$s = substr(preg_replace('/(?<=^|;)(.+?)(?=&[0-9A-Za-z]+;|$)/e', "strtoupper('$1')", ' '.$s), 1);

There is small kludge, however. Unfortunately I tired to find out the way how to exclude HTML-entity at the start of the line, so I have added 1 dummy character at the start of the text and removing it after the conversion.

<< Back to user notes page

To Top