How do I convert relevant characters in a string to HTML entities?
<?php
$mystring = "I said <ignore me then!>you <b>are a little bit</b> whack!";
echo htmlentities($mystring);
?>
Run it and see what happens!
Comment on this Question and Answer >>>
ASK A QUESTION
More strings PHP Questions
What is the difference between join and implode in PHP?How do I make the contents of a string lower case?
How do I make the first letter of each word upper case?
How do I find the last occurrence of a character in a string?
How do I calculate the metaphone of a string?
