View Single Post
Old 12-14-2012, 11:06 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,078
Ok, the issue in the strip_newlines.

The function as shown above is using single ticks (apostrophes) for the variables:

newlines = array(0 => '\r', 1 => '\n', 2 => '\r\n');

Those need to be in double tics (quotes):

newlines = array(0 => "\r", 1 => "\n", 2 => "\r\n");

Then, it will work. But there is a condition that will NEVER get hit. The third "\r\n" will never be encountered so it can be left out and you could use

newlines = array(0 => "\r", 1 => "\n");

That would work properly and give the proper result.



.
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote