34,333
edits
Changes
→Looping through PHP Array Elements
For associative arrays the foreach keyword allows you to iterate through both the keys and the values using the following syntax:
foreach ($arrayName as $variablekeyVariable=>$valueVariable)
For example: