Re: [PHP] new line function

2004-09-02 Thread Thomas Goyne
On Thu, 02 Sep 2004 01:08:20 -0400, John Holmes [EMAIL PROTECTED] wrote: Curt Zirzow wrote: $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

[PHP] new line function

2004-09-01 Thread Tonny Robertus
hi, is there any function to replace \n to br that we can see the results in html source code (not in preview)? i tried nl2br, str_replace, and ereg_replace. but all of them work just in page preview. when i looked in page source, the strings remain the same. here i enclose strings i got in

Re: [PHP] new line function

2004-09-01 Thread 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); -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for

Re: [PHP] new line function

2004-09-01 Thread 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); again.. your the master of perfection :) unix, dos, mac.. no matter, it

Re: [PHP] new line function

2004-09-01 Thread Curt Zirzow
* 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

Re: [PHP] new line function

2004-09-01 Thread John Holmes
Curt Zirzow wrote: $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