you could use css too now that i think of it.. wrap your stirng in some
div tag or somehting and use white-space: nowrap; or something like
that.

Jason
[EMAIL PROTECTED] wrote: 
> 
> Jed R. Brubaker 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?
> >  
> >
> You could just call str_replace() function of PHP along to replace the 
> '\n' with a ' '. If the database does not belong to you you could pass 
> on that load to the db server by using the mysql replace() function 
> instead ;-)
> 
> -- 
> Raditha Dissanayake.
> ------------------------------------------------------------------------
> http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
> Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
> Graphical User Inteface. Just 128 KB | with progress bar.
> 
> -- 
> 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