Smarty
[ class tree: Smarty ] [ index: Smarty ] [ all elements ]

Procedural File: function.cycle.php

Source Location: /libs/plugins/function.cycle.php



Page Details:

Smarty plugin









smarty_function_cycle [line 44]

string|null smarty_function_cycle( mixed $params, mixed &$smarty)

Smarty {cycle} function plugin

Type: function
Name: cycle
Date: May 3, 2002
Purpose: cycle through given values
Input:

  • name = name of cycle (optional)
  • values = comma separated list of values to cycle, or an array of values to cycle (this can be left out for subsequent calls)
  • reset = boolean - resets given var to true
  • print = boolean - print var or not. default is true
  • advance = boolean - whether or not to advance the cycle
  • delimiter = the value delimiter, default is ","
  • assign = boolean, assigns to template var instead of printed.
Examples:
 {cycle values="#eeeeee,#d0d0d0d"}
 {cycle name=row values="one,two,three" reset=true}
 {cycle name=row}




Tags:

author:  Monte Ohrt <at ohrt dot com monte at ohrt dot com>
version:  1.3
author:  credit to Mark Priatel <mpriatel@rogers.com>
author:  credit to Gerard <gerard@interfold.com>
author:  credit to Jason Sweat <jsweat_php@yahoo.com>
link:  http://smarty.php.net/manual/en/language.function.cycle.php {cycle} (Smarty online manual)


[ Top ]



Documentation generated on Thu, 29 Jun 2006 22:13:13 +0200 by phpDocumentor 1.3.0RC6