How to compare data in session with PHP?

CageOnede

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