<?php
$productos = array(
'producto1' => array(
'preco'=> 25,
'quantidade' => 5
),
'producto2' => array(
'preco'=> 20,
'quantidade' => 50
),
'producto3' => array(
'preco'=> 10,
'quantidade' => 100
),
);
?>
In this case, I would compare the products and return the product with a lower price and more quantity. In that case it would be product 3.
EDIT
If a product has the lowest price but quantity is not the highest, the price should be the priority.