You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
323 B
22 lines
323 B
<?php |
|
|
|
|
|
class wfHelperString { |
|
|
|
/** |
|
* cycle through arguments |
|
* |
|
* @return mixed |
|
*/ |
|
public static function cycle() { |
|
static $counter = 0; |
|
$args = func_get_args(); |
|
if (empty($args)) { |
|
$counter = 0; |
|
return null; |
|
} |
|
$return_val = $args[$counter % count($args)]; |
|
$counter++; |
|
return $return_val; |
|
} |
|
} |