RE: [PHP] Text and formating
| From: | Paulson, Joseph V. \"Jay\" | Date: | Wed, 07 Mar 2001 17:24:44 +0000 |
| Subject: | RE: [PHP] Text and formating | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42922@lists.php.net to get a copy of this message | ||
or you could just call the nl2br() function to do the same thing...
Jay Paulson
Developer, Web Technologies
Viatel, Inc.
-----Original Message-----
From: Hoover, Josh [mailto:Josh.Hoover@knowledgestorm.com]
Sent: Wednesday, March 07, 2001 11:22 AM
To: 'sono@selectcomm.ab.ca'; php-general@lists.php.net
Subject: RE: [PHP] Text and formating
You need to do a str_replace() on any fields that need to have breaks in
them. Try something like this:
echo str_replace ("\n", "<BR>", $fieldvariable)
Josh Hoover
KnowledgeStorm, Inc.
Searching for a new IT solution for your company? Need to improve your
product marketing?
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here
> IN the "add news form" they enter the info in like this:
> ----------------------------------------------------------------------
> This is a test.
>
> How are you today.
> Laddi da, Laddi da
> --------------------------------------------------------------
> ----------------
>
> The output on the news page comes as:
> --------------------------------------------------------------
> ----------
> This is a test. How are you today.Laddi da, Laddi da
> --------------------------------------------------------------
> ----------
>
> Is there a way between php and mysql to ensure that format of
> the date is
> same going in and out?