How do i loop through the following array with a foreach, so it gets printed like this:
Product1 date1 time1
product2 date2 time2
product3 date3 time3
product4 date4 time4
I have been struggling and strugling, i tried double foreaches etc, but somehow i don’t get it to work…
Is Anyone able to explain it to me?
Array
(
[product] => Array
(
[0] => product1
[1] => product2
[2] => product3
[3] => product4
)
[date] => Array
(
[0] => date1
[1] => date2
[2] => date3
[3] => date4
)
[time] => Array
(
[0] => time1
[1] => time2
[2] => time3
[3] => time4
)
)
Something like this should work:
To add data-verification/integrity to it (to stop
undefined indexerrors), also check if each index exists in the sub-arrays: