Sessions in shopping cart <p>I'm trying to show in a table the values that are stored in a session, the problem is: How to show all the information until now the application shows one of my three sessions, what about the rest? Any Idea?</p> <pre><code>&lt;?php $_SESSION['id'][] = $_GET['id']; $_SESSION['name'][] = $_GET['name']; $_SESSION['price'][] = $_GET['price']; ?&gt; &lt;h1&gt;Shopping Cart&lt;/h1&gt;&lt;br&gt; &lt;table border=1&gt; &lt;th&gt;ID&lt;/th&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Price&lt;/th&gt; &lt;tbody id="tb"&gt; &lt;?php foreach($_SESSION['name'] as $key=&gt; $n){ ?&gt; &lt;tr&gt; &lt;td&gt;&lt;?php ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $n; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre>