So you are trying to use PHP to catch a line break from a textarea, for example? Looks like you’ve been banging your head for hours! Don’t forget that \n, \r, \t, etc. are only interpolated as special characters inside double-quote string literals. That being said, you might want to do this:

str_replace("\n", ' ', $content);

 

instead of this:

str_replace('\n', ' ', $content);

Now go put some ice on that forehead.