Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Array element count

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
Budda
Smarty Regular


Joined: 19 Apr 2003
Posts: 53
Location: Lymm, Cheshire. UK

PostPosted: Wed Mar 10, 2004 3:25 pm    Post subject: Array element count Reply with quote

Have I overlooked a way to obtain the number/count of elements in an array variable?, from inside the Smarty template.

Or should i just assign the array count to another variable and pass it in from the ->assign() method?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7364
Location: Lincoln Nebraska, USA

PostPosted: Wed Mar 10, 2004 3:33 pm    Post subject: Reply with quote

{$myarray|@count}
Back to top
View user's profile Send private message Visit poster's website
Budda
Smarty Regular


Joined: 19 Apr 2003
Posts: 53
Location: Lymm, Cheshire. UK

PostPosted: Wed Mar 10, 2004 4:34 pm    Post subject: Reply with quote

Perfick!
Not see that @ notation before.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP