loop through php code example Example: php iterate through a loop <?php $scores = [1,2,3]; foreach ($scores as $score) { echo $score; }