You may want to try two loops instead of one for example you have this array
$varible['testkey1']['testkey2'] = "value"
to get to the content value do this
foreach($varible as $key1 => $value1){
foreach($value1 as $key2 => $value2){
whateverfunction('$value2);
}
}
Two loops are required because you actually have two arrays one inside the other