simple easy way to remove breaks would be to search for them and remove them:
if the string has HTML:
$myString = "<span> there is <br /> no breaks </span>";
$myString = str_replace("<br />", "", $myString);
echo $myString;
// output: <span> there is no breaks </span>
if the string is text search for newline
$myString = "there is \n no breaks";
$myString = str_replace(" \n", "", $myString);
echo $myString;
// output: there is no breaks
You could use preg_replace() and use a single regular expression to search for all line breaks regardless of HTML or plain text, do a google search for regular expression and you will figure that out,
good luck