Re: Getting a 'newline' out of a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux