Re: String formatting
| From: | raditha dissanayake | Date: | Fri, 06 Aug 2004 17:36:55 +0000 |
| Subject: | Re: String formatting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-193019@lists.php.net to get a copy of this message | ||
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.