<?php $myarray = array('php', 'is', 'cool'); for($i = 0; $i < count($myarray); $i++) { echo "The value of index $i is: {$myarray[$i]}<BR>\n"; } ?>