You are looking for the function nl2br()
Information here: http://www.newbienetwork.net/article.php?sid=70
And here: http://www.php.net/manual/en/function.nl2br.php
See echo statement below for example implementation.
Jason Lotito
www.NewbieNetwork.net
> -----Original Message-----
> From: Louis Brooks [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, May 19, 2001 8:01 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] echo question
>
>
> Hi All:
>
> I need to print out several paragraphs of information stored
> in a MySql
> field to a web page. To do this I am using:
>
> $db = mysql_connect("localhost", "dbase", "password");
> mysql_select_db("dbase",$db); $sql = "SELECT update FROM
> members WHERE username = 'Don'"; $query = mysql_query($sql);
> $results = mysql_fetch_array($query); $text = $results["update"];
>
echo nl2br($text);
>
> but it does not insert the returns between the paragraphs. I
> think I need
> to tell it to insert a <p> in place of the return. There is a
> way to do
> this as I have seen it on the PHP site when I was searching
> for something
> else. Of course now that I need it I can't find the example.
> Can someone
> please help me figure this out?
>
> Thank you,
>
> Louis Brooks
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED] To contact the list
> administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]