title: Only ITEM QUANTITY is render to the cart
body: <p>I'm trying to render the data for a specific item. At first I used a code which render its quantity and its ID. Well its work. </p>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;?php
  //render the cart for the user to view
  $cartOutput = "";
  if(!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) &lt; 1) {
      $cartOutput = "&lt;h2 align='center'&gt;Your shopping cart is empty&lt;/h2&gt;";
      }else{
          $i = 0;
          foreach($_SESSION["cart_array"] as $each_item) {
              $i++;
              $item_id = $each_item['item_id'];
              $sql = mysql_query("SELECT * FROM products WHERE id='$item_id' LIMIT 1");
              while($row = mysql_fetch_array($sql)){
                  $product_name = $row["product_name"];
                  $price = $row["price"];
  
              }
              $cartOutput .= "&lt;h2&gt;Cart Item $i&lt;/h2&gt;";
  
  
              while(list($key, $value) = each($each_item)) {
                  $cartOutput .= "$key: $value&lt;br&gt;";
                  }
              }
          }
  ?&gt;
  </code></pre>
  
  <p>But when I try to make more specific like only rendering its Id, name, price and quantity. It can only render its quantity.</p>
  
  <p>Here it is:</p>
  
  <pre><code>&lt;?php
  //render the cart for the user to view
  $cartOutput = "";
  if(!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) &lt; 1) {
      $cartOutput = "&lt;h2 align='center'&gt;Your shopping cart is empty&lt;/h2&gt;";
      }else{
          $i = 0;
          foreach($_SESSION["cart_array"] as $each_item) {
              $i++;
              $item_id = $each_item['item_id'];
              $sql = mysql_query("SELECT * FROM products WHERE id='$item_id' LIMIT 1");
              while($row = mysql_fetch_array($sql)){
                  $product_name = $row["product_name"];
                  $price = $row["price"];
  
              }
              $cartOutput .= "&lt;h2&gt;Cart Item $i&lt;/h2&gt;";
              $cartOutput .= "Item ID : " .$each_item['item_id'] . "&lt;br&gt;";
              $cartOutput .= "Item Quantity : " .$each_item['quantity'] . "&lt;br&gt;";
              $cartOutput .= "Item Name : " .$product_name . "&lt;br&gt;";
              $cartOutput .= "Item Price : Php. " .$price . "&lt;br&gt;";
  
  
              }
          }
  ?&gt;
  </code></pre>
  
  <p>Can someone guide me here? Thanks in advance.</p>