Menu
Hi, im looking for a command that will replace the “rand” command below to force the sequence to loop through in order rather than randomise.
Here is the code.
[CODE]<?php
$img = array();
$img[] = ‘<img src=”img1.jpg” />’;
$img[] = ‘<img src=”img2.jpg” />’;
$img[] = ‘<img src=”img3.jpg” />’;
$img[] = ‘<img src=”img4.jpg” />’;
$img[] = ‘<img src=”img5.jpg” />’;
$max = count($img) – 1;
$count = [B]rand[/B](0,$max);
echo $img[$count];
?>
Is this possible?
Thanks