Re: \n to <BR> Problem

From: Date: Sat, 07 Sep 2002 15:43:16 +0000
Subject: Re: \n to <BR> Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115605@lists.php.net to get a copy of this message
on 07/09/02 1:51 AM, N. Pari Purna Chand (paripurnachand@mihiramail.net) wrote: > $newstr = ereg_replace ("\n", "<BR>", $newstr); Instead, I think you'd have to escape the slash: "\\n"... but it's irrelevant, because there's a function that does this for you: $newstr = nl2br($newstr); Also, you should try to use str_replace('was', 'is', $str), because it's less resource intensive than ereg* Justin

« previous php.general (#115605) next »