note 43526 deleted from function.htmlentities by nlopess
| From: | nlopess@php.net | Date: | Thu, 24 Jun 2004 15:38:54 +0000 |
| Subject: | note 43526 deleted from function.htmlentities by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71594@lists.php.net to get a copy of this message | ||
Note Submitter: Vikrant Korde <vikrant.korde@gmail.com>
----
Consider following statements
$str = "A 'quote' is <b>bold</b>";
echo htmlentities($str);
The output of statements
A 'quote' is <b>bold</b>
This can also be achieved by
$str = str_replace("<", "$lt;", $str);
$str = str_replace(">", "$gt;", $str);
Regards,
Vikrant.