Strip new lines in php?

Use this code:

1
str_replace(array("\r", "\n"), '', $string)

Something like this:

2
$yourstring = str_replace(array("\r", "\n"), '', $yourstring)

This will remove all the weird unwanted new lines from your string.

coding

ADD A COMMENT: