note 11931 deleted from function.ereg-replace.php by philip
| From: | philip@php.net | Date: | Mon, 27 Aug 2001 12:30:09 +0000 |
| Subject: | note 11931 deleted from function.ereg-replace.php by philip | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17189@lists.php.net to get a copy of this message | ||
here is a way to make whatever is typed in a textfield come out exactly how you typed it on a page
(eg. dynamic page generation)<<stolen from submitions made earlier>>
<pre>
/* Change them if you know what into */
$br='< BR >'; $p='< P >'; //remove the spaces from those i had to
put them in there for it to submit right
/* add remove modify it into whatever you think NewLines also are */
$chr="n";
$out =ereg_replace($br."[ tn$br]*".$br, "n$p", ereg_replace("[$chr]",
"n$br", $textfield2));
$out = eregi_replace("[[:space:]]", " ", $out);
</pre>