html_entities_decode, but ignoring embedding php tags

From: Date: Thu, 24 Feb 2005 06:12:58 +0000
Subject: html_entities_decode, but ignoring embedding php tags
Groups: php.general 
Request: Send a blank email to php-general+get-209314@lists.php.net to get a copy of this message
Hello, I have a string: $str = '&lt;p&gt;This is a paragraph&lt;p&gt;&lt;?php echo \'hello\'; ?&gt;'; 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

« previous php.general (#209314) next »