Multiple index variables in PHP foreach loop

to achieve just that result you could do

foreach (array_combine($courses, $sections) as $course => $section)

but that only works for two arrays

Leave a Comment