title: How to access info stored in session array?
body: <p>Given the following code:</p>
  
  <pre><code>session_start();
  
  $cart = $_SESSION['cart'];
  
  print_r($_SESSION['cart']);
  </code></pre>
  
  <p>I can then see what I want to access:</p>
  
  <blockquote>
    <p>Array ( [153c740f526f2fa8aac9e1ddfdce2716] => Array ( [deal_id] => 38 [variation_id] => [variation] => [quantity] => 6 [data] =>......</p>
  </blockquote>
  
  <p>There is still more but that is the basics...</p>
  
  <p>What I want to be able to do is get and set the quantity:</p>
  
  <p>So I've tried:</p>
  
  <pre><code>$cart = $_SESSION['cart'];
  
  for ($i = 0 ; $i &lt; count($cart) ; $i ++)
  {
      echo "The session variable you want" . $_SESSION['cart'][$i]['deal_id'];
      echo "&lt;br&gt;";
  
  }
  </code></pre>
  
  <p>But there is no output, what am I doing wrong?</p>