you could remove all br tags, \n \r chars from the string.  use 
$string = str_replace(array('\r','\n','<br>'), '', $string);
or something similar

Jason

"Jed R. Brubaker" <[EMAIL PROTECTED]> wrote: 
> 
> Hey all! Glad you are here.
> 
> I have a question that is confusing me a bit. I am trying to output a string
> that is pulled from a database that I don't have control over.
> 
> Everything is great, except that the string needs to be all on one line with
> no line breaks (for Javascript's sake). Is there a function in PHP to make
> sure that output is on one line, regardless of the content of the line?
> 
> Below are some examples of the data.
> Thanks in advance!
> 
> MySQL (text)
> ----------------------
> Here is some text, and here is the MySQL field is a line break.
> 
> Here is more text that is still part of the text above.
> ----------------------
> 
> 
> Needed output (w/ no whitespace)
> ----------------------
> Here is some text, and here is the MySQL field is a line break. Here is more
> text that is still part of the text above.
> ----------------------
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to