Reputation: 14835
Right now I use this page to do this:
http://www.w3schools.com/tags/ref_symbols.asp
$info = str_replace("©", "©", $info);
$info = str_replace("®", "®", $info);
$info = str_replace("•", "•", $info);
$info = str_replace("½", "½", $info);
$info = str_replace("é", "é", $info);
$info = str_replace("€", "€", $info);
Is there a quick way (like a single PHP function) that can do ALL of the HTML conversions for me?
Upvotes: 0
Views: 88
Reputation: 452
PHP has a built in function, htmlentities. In your case, you would want to do this:
$info = htmlentities($info);
Upvotes: 2