Marek --
...and then Marek Kilimajer said...
%
% David T-G wrote:
% >
% >...and then Marek Kilimajer said...
% >%
% >% $string = str_replace("\n", '<br>', $string);
% >
% >That didn't work for me. Interestingly enough, in light of Leif's post,
% >neither did \r\n in the search pattern. Hmmph. Well, thank heavens once
% >again for preg_replace() :-)
...
%
% Right, I did not think about dos (\r\n) newlines. But Leif's code does
Neither did I; after all, nothing in my loop is running DOS!
% not consider mac newlines (\r) :-). This takes care of all:
Are you sure about that? He had
"/\r\n|\n|\r"
which, once I close the search delimiter, certainly should capture a mac
end-of-line...
%
% $string = str_replace(array("\r\n","\n","\r"), '<br>', $string);
Hmmm... I didn't try it as an array, but str_replace() failed for me
with both "\n" and "\r\n"...
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

