[thelist] [php] ereg_replace
Paul Bennett
paul at teltest.com
Mon Nov 18 21:37:01 CST 2002
> Without the source code, we cannot conjure an answer.
As the Big Man says: "Ask and ye shall receive" :)
$var = "<p class=\"header\">hello</p>";
echo $var."<br/>"; // shows: <p class="header">hello</p>
$var2 = htmlentities($var);
echo $var2."<br/>"; // shows: <p
class="header">hello</p><br/>
$var3 = htmlspecialchars($var);
echo $var3."<br/>"; // shows: <p
class="header">hello</p><br/>
$replaceChar = "<";
$var4 = ereg_replace(">", $replaceChar , $var);
echo $var4."<br/>"; // shows: <p class="header">hello</p>
--
Paul Bennett
Internet Developer
Teltest Electronic Design
--------------------------
Phone : 64 4 237 0767
Web : http://www.teltest.com
Wap : http://wap.teltest.com
Email : paul at teltest.com
--------------------------
More information about the thelist
mailing list