Re: Wrapping problems
| From: | Jorge Pinto Leite | Date: | Sat, 31 Aug 2002 23:23:22 +0000 |
| Subject: | Re: Wrapping problems | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21501@lists.php.net to get a copy of this message | ||
Hi,
I've tried the solution you gave to be able to see the line breaks of a blob
field of MySQL and it doesn't work.
Sorry, I'm a newbie to PHP & MySQL. Can you imagine why it's not formatting
(eg. line breaks) the text?
Thanks in advance.
Jorge
"Ray Black III" <rblack@clickcom.com> escreveu na mensagem
news:009c01bfcfce$1036c260$4516c6d1@clickcom.com...
> By the text's "formatting" I guess you mean line breaks? I can't imagine
> what else there is to format in straight text...
>
> Anyway, easy solution to this:
> echo nl2br($str);
>
> http://www.php.net/manual/function.nl2br.php
>
> -r3-
>
>
> ----- Original Message -----
> From: Paul O' Connor <paul-oconnor@ardee.aibp.ie>
> To: <php-db@lists.php.net>
> Sent: Tuesday, June 06, 2000 11:33 AM
> Subject: [PHP-DB] Wrapping problems
>
>
> > Hi,
> >
> > I'm using PHP and MySQL to develop a knowledge base at work.
> > I'm kind of new to PHP.
> >
> > I have a problem in that users are asked to enter in a full description
to
> > the knowledge base via a textarea on a form.
> >
> > This info is then stored in a field of type text.
> >
> > My problem is in displaying this text field. The text that will be
entered
> > will be formatted, e.g.
> >
> > 1. Step 1
> > 2. Step 2
> > 3. Step 3
> >
> > However, when I display the description (in a table) - the text looses
> it's
> > formatting giving
> > 1. Step 1 2. Step 2 3. Step3.
> >
> > I've tried to use the <PRE> tag in the table generated by my PHP code
but
> > that results in the table growing as wide as the longest line of text
> > instead of wrapping within the confines of the table.
> >
> > I've tried specifing a % width on my generated table but this doesn't
work
> > either.
> >
> > Any clues?
> >
> > Paul O' Connor.
> >
> >
> > --
> > 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
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.384 / Virus Database: 216 - Release Date: 21-08-2002