htmlentities()

From: Date: Thu, 27 Feb 2003 19:09:21 +0000
Subject: htmlentities()
Groups: php.general 
Request: Send a blank email to php-general+get-137456@lists.php.net to get a copy of this message
I seem to be having trouble with htmlentities(). Maybe someone has a clue I can borrow. Here's my function: function FitForHTML($string) { $asciitable = get_html_translation_table(HTML_ENTITIES); $string = htmlentities($string, ENT_COMPAT); $string = str_replace($asciitable[chr(255)], "&yuml;", $string); return $string; } When calling this function with the following data: é[a club]+ <> I get: é&#9827;+ & (I didn't send this as Unicode. The &#9827 was originally a club character.) Maybe I'm not looking in the correct area, but when I do a search in Google Groups, I get one message (well, two: one in English and one in German or some language that uses a lot of z's and c's), but that doesn't solve the problem.

« previous php.general (#137456) next »