note 9335 modified in print by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Sat, 28 Oct 2000 12:15:23 +0000 |
| Subject: | note 9335 modified in print by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-7119@lists.php.net to get a copy of this message | ||
[Editor's note: a better solution is to use htmlspecialchars() or htmlentities().]
You can print out textareas and other inputs that may contain terminators by replacing the < and
> with lt and gt.
ie.
$string=str_replace("&","&",$string);
$string=str_replace("<","<",$string);
$string=str_replace(">",">",$string);
http://www.php.net/manual/function.print.php