Smarty : substr a variable -


how can print first n characters of smarty variable, e.g. first 30 characters of {$var}?

you should use truncate modifier:

{$var|truncate:30} 

more information here.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -