note 37890 deleted from function.str-replace by didou
| From: | didou@php.net | Date: | Mon, 01 Dec 2003 14:22:32 +0000 |
| Subject: | note 37890 deleted from function.str-replace by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-61209@lists.php.net to get a copy of this message | ||
Note Submitter: php@cipri.com
----
For those that are trying to replace newlines and `weird' chars with the correct HTML chars,
have a look at these two functions:
http://www.php.net/manual/en/function.htmlentities.php
converts all chars to &code; like codes.
http://nl2.php.net/manual/en/function.nl2br.php
converts all sort of enters to a nice (X)HTML compatible <br /> followed by a \n (enter).
These two functions should fix up your code and display it properly real easily :)