Re: regular expression
| From: | Randy | Date: | Sat, 07 Oct 2000 15:17:03 +0000 |
| Subject: | Re: regular expression | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19043@lists.php.net to get a copy of this message | ||
At 02:58 PM 10/6/00 -0700, Joe Stump wrote:
>I would do this
>
>$foo = str_replace('[code]','<code>',$var);
>$foo = str_replace('[/code]','</code>',$var);
>$foo = eregi_replace("\n",'<br>',$var); // or nl2br()
I don't think that would work. I think you'd need to do this:
$foo = str_replace('[code]','<code>',$var);
$foo = str_replace('[/code]','</code>',$foo);
$foo = eregi_replace("\n",'<br>',$foo); // or nl2br()
Randy