html_entities_decode, but ignoring embedding php tags
| From: | Tim Burgan | 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 = '<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><?php echo 'hello'; ?>
How do I do this..?
Thanks
Tim