I have an array
"a" => array:99 [▶]
"b" => array:98 [▶]
"c" => array:98 [▶]
"d" => array:98 [▶]
"e" => array:98 [▶]
"f" => array:98 [▶]
"g" => array:97 [▶]
"h" => array:72 [▶]
.....
I need to filter the arrays by common keys. array a has 99 items and h has 72 items so I need to make all the arrays in this array the same 72 items based on the key.
array a:
"Johnson" => "2.94"
"Jordan" => "1.99"
"Bob" => "3.29"
"Bill" => "2.60"
"Jon" => "3.82"
......
array b:
"Johnson" => "2.94"
"Jordan" => "1.99"
"Bob" => "3.29"
"Bill" => "2.60"
"Steve" => "3.82"
......
so I essentially want the arrays a and b to be:
"Johnson" => "2.94"
"Jordan" => "1.99"
"Bob" => "3.29"
"Bill" => "2.60"
because these are the keys that are consistent across those 2 arrays.
I would need each of the arrays to have the same items based on the key that exists in all of the arrays.
Is there a way to do this if the arrays are part of the same array?