A php variable contains the following string:
text text2 item1 item2
text
text2
This should be like
str_replace("\n", '', $str); str_replace("\r", '', $str); str_replace("\r\n", '', $str);