At 11:32 PM 12/22/2001 +0100, mweb wrote:
>I know I can convert a string to all uppercases with the strtoupper()
>function. However, what if the original string contains HTML entities?
>original string = "funkstörung"

Try this:

function htmltoupper($str) {
         $trans = get_html_translation_table (HTML_ENTITIES);
         $trans = array_flip ($trans);
         $str = strtr ($str, $trans);
         $str = strtoupper($str);
         $str = htmlentities($str);
         return $str;

$string = "funkst&ouml;rung";

$string = htmltoupper($string);

echo $string;

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to