i4w_foreach

Usage:

This shortcode is used to perform a set of repetitive actions a fixed number of times, based on values passed to it, similar to a programming FOREACH loop.

This shortcode does NOT supports conditional branching with [ELSE_foreach].

Shortcode nesting is NOT supported.

Parameters:

set This parameter defines a set of comma separated (default) values passed to the shortcode, for each of which an iteration will be performed.
The value set may include words or phrases, but may not include include commas, unless a different separator is assigned.
Default: none.
Required: yes.
separator Defines the separator to use in order to separate the values passed to the shortcode.
Default: comma.
Required: no, reverts to default.

Example:

[i4w_foreach set='5,12,57,31,78']
  Going thru the loop; this time the value is  
[/i4w_foreach]

(All actions between the shortcode tags would be performed 5 times, once for each value in the "set". The internal variable placeholder,  is updated at each iteration.)

Notes:

Please consider the effect a large number of iterations could have on the performance of your site.

API:

There is no API function equivalent for this shortcode.