ok, so today i wanted to change a character into special html characters. some examples are when users enter their name is a foreign language other than english. some characters have accents and some search engines don't like that and some validation tools show as error: so lets say for example i have this name: Toledão what you see is looks like toledafaeo right, well, that's how the browser shows it to you, but if you look at this page HTML code, you will see that it looks something like this:
Toledão
well, how do you do it. PHP is great for this. if you dont have PHP yet on your website, i recommend you use our friends at www.webune.com, they have great service in hosting packages. so if you have PHP, lets continue.. lets follow the example with this name so to display it properly i would use the htmlentities() function and this how my script would look like: CODE:
<? echo htmlentities("Toledão"); ?>
OUTPUT:
Toledão
hope this helps.. if you want more information visit php.net at: http://us.php.net/htmlentities