I am makeing a comment system, i have a string where i remove html code:
$area = stripslashes(htmlspecialchars($area));
But i replace text sometimes by code, but it doesn't work because of the code above:
$txtSmileys = array (':-)', ':-(');
$imgSmileys = array ('<img src="smiley.jpg" />', '<img src="smiley-sad.jpg" />');
$text = str_replace($txtSmileys, $imgSmileys, $text);
So how can i remove html before replacing?
Sanchixx