
For those of you coming from the Microsoft ASP or ASP.Net world, you may be wondering how to safely encode a string in your PHP output. In ASP, you would use the Server.HTMLEncode() function. In PHP, you would use the built-in htmlspecialchars() function.


