Re: Line breaks in output
| From: | Joe Brown | Date: | Tue, 20 Mar 2001 01:07:54 +0000 |
| Subject: | Re: Line breaks in output | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7621@lists.php.net to get a copy of this message | ||
Better yet, use "<br>" for browsers.
Or use Jeff's method but use nl2br function to convert new line to <br>
echo nl2br($result);
""JJeffman"" <jjeffmanweb@conex.com.br> wrote in message
news:007f01c0b0d8$212e97a0$5bd4d7c8@jjeffman...
> Create a variable to concatenate the item values adding a "\n" character
> between them :
>
> $result = $item1."\n".$item2."\n".$item3 ;
> .....
> echo("<input name=text value=".$result . ">");
>
> HTH
>
> Jayme.
>
> -----Mensagem Original-----
> De: Martin Skjöldebrand <chimbis@skjoldebrand.org>
> Para: <php-db@lists.php.net>
> Enviada em: segunda-feira, 19 de março de 2001 17:47
> Assunto: [PHP-DB] Line breaks in output
>
>
> > Newbie here.
> >
> > How do I get line breaks in output from a database?
> > I have a list of things in a file, like: item1`
item2`item3
> > (etc)
> > I want them displyed in a textarea as:
> > item1
> > item2
> > item3
> >
> > Probably very simple, haven't got that far in my book yet.
> >
> > Martin S.
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-db-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>