String formatting

From: Date: Fri, 06 Aug 2004 17:24:44 +0000
Subject: String formatting
Groups: php.general 
Request: Send a blank email to php-general+get-193017@lists.php.net to get a copy of this message
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. ----------------------

« previous php.general (#193017) next »