html_entities_decode, but ignoring embedding php tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 was the PHP tags to STAY ENCODED like: <p>This is a paragraph</p>&lt;?php echo 'hello'; ?&gt;


How do I do this..?


Thanks

Tim

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux