$_SESSION 具有以下数据数组。
Array (
[totalprice] => 954
[cart] => Array (
[115] => Array (
[name] => MÅNESKINN
[price] => 268.00
[count] => 1 )
[80] => Array (
[name] => DELFINLEK
[price] => 268.00
[count] => 1 )
[68] => Array (
[name] => OPPDAGELSEN
[price] => 418.00
[count] => 1 ) )
[shipping] => 65 )
现在我需要比较价格并找到最高价格,以便使用以下代码确定运费。
...
$shippingprice = 25.0;
if ( $priceincart > 268 ){
$shippingprice = 65.0;
}
...
$_SESSION['shipping'] = $shippingprice;
如何从数组中找到最高价格?
提前致谢。