feulf / raintpl3

The easiest Template Engine for PHP
https://feulf.github.io/raintpl
258 stars 57 forks source link

Cacul on function tag {function="(count($array) + 1)"} #139

Open rmontagne opened 10 years ago

rmontagne commented 10 years ago

Hello,

With this new version i can do this : {function="(count($array) + 1)"} !! Now what is the best solution to doing this ??

Thanks for your response.

Best regards Romain.

feulf commented 10 years ago

This

{$array|count + 1} 

and if you want to save that number

{$variable=(count($array)+1)}
rmontagne commented 10 years ago

Thanks for your help, RainTPL the best template engine ;)