Skip to content
polysign edited this page Apr 8, 2011 · 3 revisions

wpSwitch is a simple Wordpress plugin to switch through an array. You can use it standalone if you want to. It's just a single file :)

1. initialize wpSwitch:

$obj = new wpSwitch(array( "red", "blue", "green" ));

2. use it inside a loop

echo $obj->go() . " ";

3. this will output

red blue green

Clone this wiki locally