$array = [ [ 'Name' => 'Product 1', 'Quantity' => 0, 'Price' => 70 ],
[ 'Name' => 'Product 2', 'Quantity' => 2, 'Price' => 100 ],
[ 'Name' => 'Product 3', 'Quantity' => 2, 'Price' => 120 ] ];
echo min( array_column( $array, 'Price' ) ); // 70
It does get me the min price, but I also want to check for quantity, in that case 100 would be the lowest.
Is there an elegant way to do this without looping?