title: Shopping cart calculating total
body: <p>Good day, below is a piece of code that increments the total cost for each product in the session array. My problem is displaying 0 at the end of the total when the last peny = 0.</p>
  
  <p>Example 1, 2.20 + 2.20 = 4.40 but only 4.4 is shown</p>
  
  <p>Example 2, 2.20 + 2.25 = 4.45 and 4.45 is shown</p>
  
  <pre><code>$total = 0;
  if (isset($_SESSION['cartItems'])){
      foreach ($_SESSION['cartItems'] as $product){
          $total += $product['cost'];
      }
  }
  echo $total;
  </code></pre>
  
  <p>Any advice on how to show/include when a 0 is entered?</p>