John, et al -- ...and then John Holmes said... % % Okay, you got me on that one, but why do you need to remove the
In my case, I had a newline-delimited file of field@@data field@@data field@@data and when the data had an embedded newline like comment@@this is a long comment field@@data then it messed things up. Yeah, I learned about the possibility of using XML along the way, and I've already thought about serialize and base64 (which I *do* use inside the code, though not out in the file) for simple protections, but a requirement was that the text file also be readable and editable by people -- and, besides, I'm just extending this code rather than writing it :-) % newlines? It should be stored in the database (if you're doing so) with % the newlines and not the HTML breaks. You only use the nl2br() to % output it on a web page, so who cares if the new lines are still there? For output, it doesn't matter, as you say. My problem was input :-) % % The manual page explains this correctly, btw. It says that a "<br />" % will be inserted before all newlines. Yeah, but that requires actual reading ;-) Who knows any more what TFM is? % % ---John Holmes... HTH & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg79529/pgp00000.pgp
Description: PGP signature