Re: new line function

From: Date: Thu, 02 Sep 2004 05:22:44 +0000
Subject: Re: new line function
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-195511@lists.php.net to get a copy of this message
* Thus wrote Curt Zirzow: > * Thus wrote John Holmes: > > Tonny Robertus wrote: > > > > >is there any function to replace \n to <br> that we can see the results in > > >html source code (not in preview)? > > > > $fixed = preg_replace("/(\r?\n)|\r/",'<br />',$oldstring); on retrosopect.. reading into that regex i get: unix: sets the standard to use \n windows: can't really decide on \r or \n so just uses them both mac: goes oposite of everybody and used \r instead. It seems OS's can simply be described on how they treat EOL, all the rest of the differences are side effects of this behaviour. :) Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!

« previous php.general (#195511) next »