The $_SESSION has the following data array.
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 )
Now I need to compare the price and find the highest price in order to determine the shipping charge with the following code.
...
$shippingprice = 25.0;
if ( $priceincart > 268 ){
$shippingprice = 65.0;
}
...
$_SESSION['shipping'] = $shippingprice;
How can I find the highest price from the array?
Thanks in advance.