Say I have two arrays:
$array1
Array
(
[app] => Array
(
[name] => PunchClock
[shifts] => Array
(
[maxhours] => 16
[minhours] => 4
)
[con] => Array
(
[moog] => 3
)
)
)
and $array2
Array
(
[app] => Array
(
[name] =>
)
)
I'm trying to find a way use the second array in order to get its corresponding value coming from the first array. For example, if I were to call:
$value = $array2['app']['name']
The corresponding value would be PunchClock. If I were to choose $array2['app']['shifts']
, the corresponding value would return an array containing maxhours
and minhours
. I've tried intersecting the arrays but not getting anywhere. I've running this in recursion but it's getting quite messy. I don't know what other options to use at this point. Any help would be appreciated.