Foreach

From Sega Retro


A template for iterating through a list and doing something to each item.

Examples

{{foreach
|list=Whoop, gloop, bloop, doop, shoop
|delimiter=,
|<br/>
*[value]
}}

Produces:



  • Whoop
  • gloop
  • bloop
  • doop
  • shoop


{{foreach
|list=Mega Drive-Master System-Saturn-Dreamcast
|delimiter=-
|[[[value]]] 
}}

Produces:


Mega Drive Master System Saturn Dreamcast