PDA

View Full Version : htmlspecialchars not doing job



santamonica10
01-04-2008, 02:07 AM
I can not figure out why when using:


$description = $row['DESCRIPTION'];
$description = htmlspecialchars($description);

$description returns
Modular �T�

instead of
Modular "T"

Could anyone please help? I am dumbfounded.

Thanks.

Corey

Rockonmetal
01-04-2008, 02:46 AM
Could it possibly be that since special character codes like © have a ";" which indicates the end of a line for php... I highly doubt thats the reason... but otherwise idk...

Twey
01-04-2008, 05:21 AM
� is not a special character in HTML, and even if it were it wouldn't be converted to a quote. What are you trying to do, and why do you think htmlspecialchars() will do it?