Re: Getting a 'newline' out of a string
| From: | Richard Davey | Date: | Fri, 10 Aug 2007 16:53:07 +0000 |
| Subject: | Re: Getting a 'newline' out of a string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260618@lists.php.net to get a copy of this message | ||
Hi Faither,
Friday, August 10, 2007, 5:16:09 PM, you wrote:
> I'm kind of lost with how str_replace , preg_replace, ereg_replace or
> even explode are handling a "\n"-ewline.
> I have a text string from a form and am trying to replace the "\n" or
> chr(10) or however you might call the newline with a simple html break tag.
Why not just use nl2br() in this case?
Cheers,
Rich
--
Zend Certified Engineer
http://www.corephp.co.uk
"Never trust a computer you can't throw out of a window"