It works!

thanks a lot, Michael!!

                mweb

On Sunday 23 December 2001 00:41, Michael Sims wrote:
> At 11:32 PM 12/22/2001 +0100, mweb wrote:
> >Hello,
> >
> >I know I can convert a string to all uppercases with the strtoupper()
> >function. However, what if the original string contains HTML entities?
> >
> >EXAMPLE:
> >
> >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 (http://www.php.net/)
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