i have a multidimensional array the first two statements of code work fine... notice them below...
echo $arrayObjects['name'].'<br>';
echo $arrayObjects['ipv4']['10.14.2.22']['type'].'<br>';
but i want to be able to return the keys in the ipv4 array, instead of having to hard code them like i did above. when i do the following:
print_r( array_keys($arrayObjects['ipv4']));
I get the following output:
Array ( [0] => 10.14.2.22 )
which is great. but how do i get the ip address returned to me as a variable?
$ips = array_keys($arrayObjects['ipv4']); $ip = $ips[0]; var_dump($ip);