[thelist] Please help.. PHP guru's

Tim Burgan email at timburgan.com
Thu Feb 24 06:57:08 CST 2005


Hello,


I have a string:
$str = '<p>This is a paragraph<p><?php echo \'hello\'; 
?>';

Which I convert using:
html_entity_decode(stripslashes($str));

Which result in:
<p>This is a paragraph</p><?php echo 'hello'; ?>


But.. I need to manipulate the string in such a way that the PHP tags to 
STAY ENCODED like:
<p>This is a paragraph</p>&lt;?php echo 'hello'; ?&gt;


How do I do this..? Would I use regular expressions, but how?


Thanks

Tim




More information about the thelist mailing list