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
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More strings PHP Questions
How do I convert relevant characters in a string to HTML entities?How do I fetch the meta tags from a webpage using PHP?
How do I find the last occurrence of a character in a string?
What is the usage of { } in string handling in php?
How do I count how many times each character occurs in a string?
