ho dimenticato di salvare l'array in una variabile ecco il codice corretto
Codice PHP:
Class Cart extends Home
{
function price_sort($a, $b)
{
$price_a = $a['options']['shipPrice'];
$price_b = $b['options']['shipPrice'];
if ( $a == $b )
return 0;
return ($a > $b) ? 1 : -1;
}
function get_total_ship_price()
{
$array_shop = $this->cart->contents();
uasort($array_shop, array($this, "price_sort"));
print_r($array_shop);
}
}
grazie mille a tutti e tre