Quote:
Originally Posted by Webmaster Advertising
Trim worked perfectly, thanks Sarettah.
Stupid question though, if this was just a list of words typed in notepad, one word per line, how come there was a space in there, is that an issue with the server parsing the array or something notepad related?
|
There was no space.
Your strip_newlines function is NOT stripping properly. I just did a couple of tests just to prove it to myself. There was still a carriage return and linefeed in there.
Too loopy right now to look through the function. I say get rid of it because it is unneeded.
If you go back to the code before the trim and look at view source you will see that what in html looked like a space was actual a skip down a line. But since html does not use carriage returns (it uses the <br> tag) you do not see it in the browser.
Handling the carriage return/line feeds using the chr (character function) takes care of it.