Hello, kindly tell me why this is not working, I'm a begginer in PHP. <?php $a = file_get_contents("http://www.manele.me/"); ereg_replace("<", "<", $a); ereg_replace(">", ">", $a); echo $a; ?> Code (markup):
Do you want to strip ALL html tags or just convert the '<' into '<' and '>' to '>' ? If you want to strip ALL html tags, use strip_tags() functions. Else have a look at htmlentities() and htmlspecialchars() functions.
Is that all you want to do? Because if you want, you can just use htmlentities. The following is from the PHP manual .. <?php $str = "A 'quote' is <b>bold</b>"; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str); // Outputs: A &# 039 ;quote &# 039 ; is <b>bold</b> echo htmlentities($str, ENT_QUOTES); ?> PHP: BTW ... I had to put the spaces in between the # and the 39 so it wouldn't get translated to '