hey there,
as part of my application, I build an array of arrays. So, what I have is this:
$mainArray = array();
$mainArray = $somearray;//as built with results from a query
$mainArray = $someOtherArray;//built same as above
//I want to iterate:
foreach($mainArray as $array)
{
foreach($array as $dataArray)
{
echo $dataArray['0'];
}
}
But that seems to not work for me. I tried print_r($dataArray); inside my second foreach loop, but that shows that $dataArray is not read as an array. Rather, print_r prints out ints.
Any idea what's going on?
Thanks in advance.