Re: String formatting
| From: | Jason Davidson | Date: | Fri, 06 Aug 2004 17:42:08 +0000 |
| Subject: | Re: String formatting | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-193021@lists.php.net to get a copy of this message | ||
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
jabber@raditha.com 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
>
>