How to print iteration of the foreach in smarty


We can print each iteration number in foreach of smarty.

{foreach from=$myArray item=i name=foo}
{$smarty.foreach.foo.iteration},
{/foreach}
Advertisements

2 thoughts on “How to print iteration of the foreach in smarty

  1. Hey. Very nice blog!! Guy .. Beautiful .. Wonderful .. I will bookmark your website and take the feeds additionally…I am glad to locate a lot of helpful information here within the post. Thanks for sharing..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s