So let's say I have an array with key => values I want to output in 2 different HTML lists. Is it possible to do so by using the same loop?
<ul>
// Start foreach and get keys and values**
<li>$key</li>
// "Pause" foreach to output the next couple of lines once
</ul>
<ul>
// Resume foreach
<li>$value</li>
// End foreach
</ul>
The output should be
- Key 1
- Key 2
- Key 3
- Value 1
- Value 2
- Value 3