alternator($args)
Parameters:
$args (mixed) – A variable number of arguments Returns:
Alternated string(s) Return type:
mixed
Allows two or more items to be alternated between, when cycling through a loop. Example:
for ($i = 0; $i < 10; $i++)
{
echo alternator('string one', 'string two');
}
You can add as many parameters as you want, and with each iteration of your loop the next item will be returned.
for ($i = 0; $i < 10; $i++)
{
echo alternator('one', 'two',