View Single Post
  #5 (permalink)  
Old 01-29-09, 03:47 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Here is where the modulus operator comes handy:
PHP Code:

<?php


$array 
= array(1234);
$count sizeof($array);

for (
$i 0$i 7$i++)
{
    
$key = ($i $count);
    
    echo 
$array[$key], "<br />\n";
}

?>
Reply With Quote