Re: [SMARTY] nl2br in a template?
| From: | Juzan Jean-Michel | Date: | Fri, 21 Feb 2003 23:27:05 +0000 |
| Subject: | Re: [SMARTY] nl2br in a template? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8112@lists.php.net to get a copy of this message | ||
Le sam 22/02/2003 à 00:10, gawan a écrit :
> Hi
>
> I have text fields from a database to display through smarty template.
> Is there a convenient way to use something similar to php nl2br()
> to show new lines as <br> tags when in a template?
>
> gawan
>
This is in the manual
{$mytext|regex_replace:"/[\n]/":"<br>"}
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Jean-Michel Juzan jmjuzan@ecreasol.ch
Direction Informations & Technologies
eCreaSol - NetWork Creative Solutions SARL - http://www.ecreasol.ch/
PGP public keys server : http://www.keyserver.net
Attachment: [application/pgp-signature] signature.asc
Attachment: [application/pgp-signature] signature.asc