to achieve just that result you could do
foreach (array_combine($courses, $sections) as $course => $section)
but that only works for two arrays
More Related Contents:
- How does PHP ‘foreach’ actually work?
- PHP How to determine the first and last iteration in a foreach loop?
- Performance of FOR vs FOREACH in PHP
- How to find the foreach index?
- How do you remove an array element in a foreach loop?
- How do you loop through $_FILES array?
- FOR loop performance in PHP
- Removing last comma from a foreach loop
- case-insensitive array_unique
- How to perform an action every 5 results?
- endforeach in loops?
- foreach with three variables add
- How to display two table columns per row in php loop
- How to limit items from for loop?
- PHP Foreach returns separated(individual) arrays
- Php foreach give 2 users random value
- Invalid argument supplied for foreach()
- Strange behavior Of foreach
- Modify array values in foreach loop
- PHP foreach loop key value
- What is the best way to loop through this array in PHP?
- How to execute two mysql queries as one in PHP/MYSQL?
- How to loop through an associative array and get the key? [duplicate]
- PHP Error : Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` [duplicate]
- How to delete object from array inside foreach loop?
- How do i count same values in an array and store it to a variable?
- How to modify an array’s values by a foreach loop?
- While destructuring an array, can the same element value be accessed more than once?
- Loop over DOMDocument
- display only 3 foreach result per row