Вид массива вот так:
Код: Выделить всё
$array1 = [
['id' => 1,'name' => 'test1','desc' => 'test_desc','quantity' => 3],
['id' => 2,'name' => 'test2','desc' => 'test_desc','quantity' => 33]
];
$array2 = [
['holder' => 'John','name' => 'test1','desc' => 'test_desc','location' => 'ATL'],
['holder' => 'Jackie','name' => 'test3','desc' => 'test_desc','location' => 'SF']
];
Подробнее здесь: https://stackoverflow.com/questions/453 ... alue-if-fo