array.php simple array example php source code $a = array(1.0, 2.0, 3.0, 5.0); $alength = count($a); for($i = 0; $i < $alength; $i++) { echo $a[$i]; echo "\n"; } 1 2 3 5