php - foreach loop for number of arrays -
code:
foreach ($output $result) print_r($result);
below output of above code:
array ( [0] => 323 [1] => 323 [2] => 323 [3] => 323 [4] => 65 [5] => 65 [6] => 65 [7] => 65 [8] => 121 [9] => 121 [10] => 121 [11] => 121 ) array ( ) array ( ) array ( [0] => 656 [1] => 656 [2] => 656 [3] => 656 ) array ( [0] => 777 [1] => 777 [2] => 777 [3] => 777 ) array ( [0] => 321 [1] => 321 [2] => 321 [3] => 321 [4] => 434 [5] => 434 [6] => 434 [7] => 434 [8] => 400 [9] => 400 [10] => 400 [11] => 400 ) array ( ) array ( ) array ( [0] => 300 [1] => 300 [2] => 300 [3] => 300 [4] => 666 [5] => 666 [6] => 666 [7] => 666 ) array ( ) array ( [0] => 167 [1] => 167 [2] => 167 [3] => 167 )
i want print each array separately. trying nested foreach
loop not getting required output.
please help
nested loop simple
foreach ($output $outer) { foreach ($outer $inner) { print_r($inner); } }
Comments
Post a Comment