I am trying to access the following array,
Array ( [return] => Array ( [0] => Array ( [issue] => Array ( [0] => Array ( [first] => activeissue.socustomername [second] => TEST123 [key] => activeissue.socustomername [value] => TEST123 ) [1] => Array ( [first] => activeissue.customername [second] => TEST123 [key] => activeissue.customername [value] => TEST123 ) [2] => Array ( [first] => activeissue.customerid [second] => 1131 [key] => activeissue.customerid [value] => 1131 ) ) ) [1] => Array ( [issue] => Array ( [0] => Array ( [first] => activeissue.socustomername [second] => TEST4321 [key] => activeissue.socustomername [value] => TEST4321 ) [1] => Array ( [first] => activeissue.customername [second] => Aspire Trust [key] => activeissue.customername [value] => Aspire Trust ) [2] => Array ( [first] => activeissue.customerid [second] => 1132321 [key] => activeissue.customerid [value] => 1132321 ) ) ) ) )
I can't get my head round to loop through and return each issue,
I can manually get the data, but I really need to loop through each individual issue,
I have tried to double Foreach it, but i'm sure there is a much easier way that works, unlike myn,
foreach($array as $key['issue'] => $value){ foreach($value[0]['issue'] as $subkey){ echo $subkey['key'].' : '.$subkey['value']; } }
I only get returned one issue, I know its because i am only accessing [0] but I don't know how to loop through again to access the next set of data,
Any help would be great, welcome any advice too.