I have a multidimensional array like this coming from an POST;
array(4) {
["id"]=> array(3) {
[0]=> string(1) "4"
[1]=> string(1) "5"
[2]=> string(1) "6"
}
["deliverer"]=> array(3) {
[0]=> string(13) "x"
[1]=> string(12) "y"
[2]=> string(5) "z"
}
["num_users"]=> array(3) {
[0]=> string(2) "10"
[1]=> string(2) "10"
[2]=> string(1) "5"
}
["ADD"]=> string(6) "FORWARD"
}
I would like to associate the ID to the "deliverer" and the "num_users" in order to update a table in MySQL. I've tried both this way:
foreach ($_POST as $data){
var_dump($data);
}
and
foreach ($_POST as $key=>$value){
var_dump($value);
}
But in both cases I ain't going in the right direction. I ain't so skilled so I wish to have some tips on how to proceed correctly.
Kind regards,
Chris