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=,
|template=Test2
}}

Produces:

  • INPUT: Whoop
  • NO BRACKETS: Whoop


*INPUT: gloop

  • NO BRACKETS: gloop


*INPUT: bloop

  • NO BRACKETS: bloop


*INPUT: doop

  • NO BRACKETS: doop


*INPUT: shoop

  • NO BRACKETS: shoop


{{foreach
|list=Mega Drive-Master System-Saturn-Dreamcast
|delimiter=-
|template=Test2
}}

Produces:

  • INPUT: Mega Drive
  • NO BRACKETS: Mega Drive


*INPUT: Master System

  • NO BRACKETS: Master System


*INPUT: Saturn

  • NO BRACKETS: Saturn


*INPUT: Dreamcast

  • NO BRACKETS: Dreamcast