What is the best way to make sure that array $b has all the subarrays from $a despite the numeric keys (0,1,2.. etc)
$a = [
0 => ['v' => 1, 'f' => 2],
1 => ['v' => 144, 'f' => 443]
];
$b = [
0 => ['v' => 1, 'f' => 2],
1 => ['v' => 25, 'f' => 3],
2 => ['v' => 144, 'f' => 443]
];
My approach with foreach inside foreach inside foreach and multiple ifs... quickly becomes a mess.