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