0
<?php
$productos = array(
'producto1' => array(
'preco'=> 25,
'quantidade' => 5
),
'producto2' => array(
'preco'=> 20,
'quantidade' => 50
),
'producto3' => array(
'preco'=> 10,
'quantidade' => 100
),
);
?>
I would like in this case compare the products and return the product with lower price and higher quantity. In this case would be the product 3.
EDIT
If a product has the lowest price but quantity is not the highest, the price should be the priority.
But what if a product has the lowest price but quantity is not the highest? Or vice versa? How to process it. For example:
'producto4' => array(
 'preco'=> 1,
 'quantidade' => 50
 ),
If this product was also in your example– Miguel
@Miguel really, in this case the price becomes the priority. I edited the question ! Thanks
– PululuK
I think it can be duplicated, https://answall.com/search?q=qsort+array+php
– Miguel