I need to remove newlines from a string using the hex value for newline. The string may contain "\n", and I do not want to remove those, only newlines in the string. For instance, this is my string:
How would I remove the newlines under "Hello" while leaving the "\n" in tact after "World"? I figured I could use the hex value of NL, but this does not work:
World\n\nHow are you today?
It just returns the original string with the newlines after "Hello" in tact. Any ideas?
echo ereg_replace("\x0A", ' ', $string);