Re: Campo BLOB en MySQL
| From: | David Ayala | Date: | Thu, 14 Dec 2000 07:27:37 +0000 |
| Subject: | Re: Campo BLOB en MySQL | ||
| References: | 1 2 3 4 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-4970@lists.php.net to get a copy of this message | ||
Muchas gracias por la ayuda....
Ahora ya funciona... lo hice tal cual me has dicho!
$descripcion = nl2br (row[descripcion]);
GRACIAS POR LA AYUDA!!
> Hola,
>
> Está en el manual de PHP:
>
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> nl2br -- Converts newlines to HTML line breaks.
> Description
>
> string nl2br(string string);
>
> Returns string with '<BR>' inserted before all newlines.
>
> See also htmlspecialchars() and htmlentities().
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> Con el campo de texto que recibes del form, tienes que hacer algo así:
>
> $descripcion = nl2br ($descripcion);
>
> nl2br añade '<BR>' antes de cada '\n', con lo que lo puedes mostrar
> como
> un texto HTML.
>
> También vale la pena que pases el texto por htmlentities(), para evitar
> que te metan código HTML o Javascript. Hay gente bastante rara por ahí.
>
> Algo así: $descripcion = htmlentities (nl2br ($descripcion));
>
> Xavier
>
>
> David Ayala wrote:
> >
> > Teneis algun ejemplillo de como usar la funcion nl2br() ???
> >
>
>
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>
>