RE: [PHP] Simple String Replace Question
| From: | Jeff Oien | Date: | Mon, 26 Feb 2001 05:23:04 +0000 |
| Subject: | RE: [PHP] Simple String Replace Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41650@lists.php.net to get a copy of this message | ||
> <html>
> <body>
>
> <form method=post>
> <textarea name="str" cols=50 rows=10></textarea><br>
> <input type=submit>
> </form>
>
> <hr><pre>
> <?php
> $str = ereg_replace("([^\r\n])\r\n([^\r\n])", "\\1 \\2", $str);
> echo $str;
> ?>
> </pre>
>
> </body>
> </html>
Got it now. I didn't didn't have <pre></pre> tags in mine. With
the <pre> tags it works as prescribed. Thanks! The other
troubleshooting examples were helpful too to know what's
going on with those characters.
Jeff Oien