Leif, et al -- ...and then Leif K-Brooks said... % % David T-G wrote: % % >I need a true nl2br function to get rid of newlines; I am accepting a % >changed ini file parameter but the newline kills me. % > % Try: % $text = preg_replace("/\r\n|\n|\r", '<br>', $text);
Aha! Sure enough, that did it. In fact, just \r\n worked for me, but as long as I'm looking for both I might as well look for each. Who would think that input would be converted to DOS format? This tickles the back of my mind as something that I've seen before, now that it's shown to me again... I'm going to have to go looking now that I know the answer to see if I can find it in the archives. Thanks! & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature