ik heb volgende array
Code: Selecteer alles
print "<pre>";
print_r($aantal);
print "</pre>";
Array
(
[5048132097-1537439059] => Array
(
[ COTM ] => Array
(
[tijdstip] => 20:30
[0] => Array
(
[traiteur] => COTM
[aantal] => 10
[naam] => Menu
[type] =>
[wie] => Residentie
[datum] => 03/09/2018
)
[1] => Array
(
[traiteur] => COTM
[aantal] => 1
[naam] => Menu
[type] =>
[wie] => Extern
[datum] => 03/09/2018
)
[2] => Array
(
[traiteur] => COTM
[aantal] => 1
[naam] => Menu
[type] => V
[wie] => Andere
[datum] => 03/09/2018
)
[3] => Array
enz . . . .
ik doe onderstaande for each loops
Code: Selecteer alles
foreach($aantal as $trat1)
{
foreach($trat1 as $trat2)
{
print $trat2['tijdstip'] . "<BR>";
foreach($trat2 as $trat3)
{
print $trat3['wie'] . " -" . $trat3['aantal'] . "<BR>";
}
}
}
en krijg volgend resultaat
Code: Selecteer alles
20:30
2 -2
Residentie -10
Extern -1
Het is telkens de eerste character van de value erboven
Iemand een idee ??