RE: [PHP] trim...
| From: | Luis Lebron | Date: | Wed, 26 Nov 2003 17:07:31 +0000 |
| Subject: | RE: [PHP] trim... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-171099@lists.php.net to get a copy of this message | ||
You need to strip the newlines.
str_replace("\n", " ", $body);
Luis
-----Original Message-----
From: Tristan.Pretty@risk.sungard.com
[mailto:Tristan.Pretty@risk.sungard.com]
Sent: Wednesday, November 26, 2003 10:59 AM
To: php-general@lists.php.net
Subject: [PHP] trim...
Why doesn't this work...?
$body = "
<p>blurb blah
<p>happy days
<p>end of text";
$body = trim($body);
$body now should output:
"<p>blurb blah\n<p>happy days\n<p>end of text" but it doesn't...?
I'm using a text string in a javascript, adn it needs to be outbut on one
line to work, yet this isn't doing it...
Any ideas?
*********************************************************************
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***********************************************************************