<? /* values */ $a = array (1, 2, 3, 17); foreach ($a as $v) { print "Current value of \$v: $v.<br>"; } /* values and keys */ $a = array (1, 2, 3, 17); foreach($a as $k => $v) { print "\$a[$k] is $v<br>"; } ?>