PHP Knowledge Base
Loop through a simple array using foreach
$resident1 = 'Gene Simmons'; $resident2 = 'Paul Stanley'; $resident3 = 'Ace Frehley'; $resident4 = 'Peter Criss'; $array__residents = array($resident1, $resident2, $resident3, $resident4); foreach ($array__residents as $resident) { echo "$resident<br>"; }