Seif Sayed
Seif Sayed

Reputation: 803

Foreach Twig 2 arrays simultaneous

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

I want to achieve this as well in twigs I have tried this

   {% for user in allusers , bd in bds %}  

but it doesn't work any help would be appreciated.

Upvotes: 1

Views: 1096

Answers (1)

nick.gorborukov
nick.gorborukov

Reputation: 64

you have to write your own twig extension for array_combine

Upvotes: 2

Related Questions