PHP foreach loop through multidimensional array
- by Muiter
I have an multidimensional array, how can I use it? I want to use each seperate array in an for loop.
I have this code
<?php
foreach ($calculatie_id[$i] as $value)
{
echo $value;
}
?
print_r($calculatie_id); gives
Array ( [0] = Array ( [0] = 4 [1] = 6 ) [1] = Array ( [0] = 1 [1] = 5 ) [2] = Array ( [0] = 5 [1] = 6 ) [3] = )
But when using the foreach I only get 46