my fields have line breaks but when i use $xmlStr=str_replace("\n",'',$xmlStr); sod all happens - i know the replace works as i tested it with $xmlStr=str_replace("\n",'a',$xmlStr); i get a some text a more text a even more is there a function to "remove" a line break/character etc rather than "replace"
dontcha just love google - i had forgotten about carriage returns $xmlStr=str_replace("\n",'',$xmlStr); $xmlStr=str_replace("\r",'',$xmlStr);
rtrim() only removes line breaks at the end of the string. He clearly has to remove line breaks within the string content.
Oh well of course, the dreaded Windows line break $text = preg_replace("/(r|n)/", "", $text); PHP: Easiest way to get rid of them all I can think of.