View Single Post
Old Dec 13th, 2006, 3:05 AM   #6
headzoo
Newbie
 
Join Date: Oct 2006
Posts: 16
Rep Power: 0 headzoo is on a distinguished road
PhilBon is correct. Arrays are meant to deal with these kinds of situations. Your code should have looked more like this:

$ga = array(4, 3, 1, 2, 4, 2);
for ($i = 0; $i < count($ga); $i++) {
	echo "The # $i: " . $ga[$i] . "<br />";
}

- Sean
headzoo is offline   Reply With Quote