Discussion
:
Counting number of array elements
Afficher un message
09/02/2006, 16h16
#
2
Monte Ohrt
Messages: n/a
Hébergeur:
Re: [SMARTY] Counting number of array elements
http://smarty.incutio.com/?page=Smar...ons#template-1
Dep wrote:
>Hello to all!
>
>Is there any straight and obvious way to count the number of elements
>in some array???
>
>maybe I'm blind, but can't find that in the manual, and the only way
>out I've found so far is like this.
>
>{foreach from=$some_arr item=$i name="my_foreach"}{/foreach}
>Number of elements: {$smarty.foreach.my_foreach.total}
>
>Looks horribly stupid
So, any other way?
>
>Best regards
>Dmitriy
>
>
>
Monte Ohrt
Page generated in
0,04415
seconds with
9
queries