Re: [SMARTY] nl2br in a template?

From: Date: Sat, 22 Feb 2003 00:39:15 +0000
Subject: Re: [SMARTY] nl2br in a template?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8114@lists.php.net to get a copy of this message
register the function: $smarty->register('nl2br','nl2br'); then in your template: {$foo|nl2br} Or, use a modifier like suggested, and the register is unnecessary. Monte On Fri, 2003-02-21 at 17:10, gawan wrote: > 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 -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.general (#8114) next »