note 20051 added to function.ereg
| From: | webmaster at relentfornoone dot com | Date: | Wed, 20 Mar 2002 18:23:39 +0000 |
| Subject: | note 20051 added to function.ereg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27998@lists.php.net to get a copy of this message | ||
One useful way to replace a new line character "\n" within your code COMPLETELY it to use
this:
$comments = ereg_replace("(.\n)", "<br >", $comments);
This makes a msg that comes into your prog looking like this:
"Hey ...
Mucho Bueno"
Turn into this:
"Hey ...<br ><br >Mucho Bueno"
This is useful for people who keep a .txt file database, with each line in that database refering to
one entry ...
NOTE the spaces in the break return tags "<br >", this is so they will be displayed
on this page, please remove the spaces ...
--
http://www.php.net/manual/en/function.ereg.php
http://master.php.net/manage/user-notes.php?action=edit+20051
http://master.php.net/manage/user-notes.php?action=delete+20051
http://master.php.net/manage/user-notes.php?action=reject+20051