title: How to compare data in session with PHP?
body: <p>The $_SESSION has the following data array.</p>
  
  <pre><code>Array (
  [totalprice] =&gt; 954
  [cart] =&gt; Array (
        [115] =&gt; Array (
        [name] =&gt; MÅNESKINN
        [price] =&gt; 268.00
        [count] =&gt; 1 )
  [80] =&gt; Array (
        [name] =&gt; DELFINLEK  
        [price] =&gt; 268.00
        [count] =&gt; 1 )
  [68] =&gt; Array (
        [name] =&gt; OPPDAGELSEN
        [price] =&gt; 418.00
        [count] =&gt; 1 ) )
  [shipping] =&gt; 65 ) 
  </code></pre>
  
  <p>Now I need to compare the price and find the highest price in order to determine the shipping charge with the following code.</p>
  
  <pre><code>...
  $shippingprice = 25.0;    
  if ( $priceincart &gt; 268 ){
     $shippingprice = 65.0;
  }
  ...
  $_SESSION['shipping'] = $shippingprice;
  </code></pre>
  
  <p>How can I find the highest price from the array?</p>
  
  <p>Thanks in advance.</p>