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

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

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -