I have an array
$array1 = Array (
[a1] => Array (
[a_name] => aaaaa
[a_value] => aaa
)
[b1] => Array (
[b_name] => bbbbb
[b_value] => bbb
)
[c1] => Array (
[c_name] => ccccc
[c_value] => ccc
)
)
Now I want to extract the value of $array1[b1][b_name]. But the thing here is the keys (b1 and b_name) will be generated dynamically. The situation here is I have a multidimensional array and the keys of which i want the value. So how do i get the value.
eg.
$array1[b1][b_name]
should return
bbbbb
and
$array1[c1]
should return
array([c_name]=>ccccc
[c_value]=>ccc
)
and so on...
EDIT
Lets keep it this way, The second array is
$array2 = Array (
[b1] => Array (
[b_name]=> zzzzz
)
)
Now Intersecting $array1 and $array2, I want the value of the $array1 ie. bbbbb