How do I convert characters to HTML entities using PHP?
<?php
$address = "www.food.com?blah=this and that&blah2=done";
echo HTMLentities($address);
//www.food.com?blah=this and that&blah2=done
?>
More strings PHP Questions
How do I escape a string with slashes?How do I make the contents of a string lower case?
How do you check if a variable is set or not in PHP?
How do I turn a string into an array?
How do I extract the values of variables from a string?