How to put link around table data in PHP
<p>I'm trying to put a link around data in a table. So if the user clicks on the link it will bring them to the edit page for that item. Every time I put the code in the data will disappear from the table. Here is the code for my page I'm working on: </p>

<p>I'm trying to put clickable data at the start of the table code</p>

<pre><code>&lt;?php include '../view/header.php'; ?&gt;


&lt;div id="main"&gt;

    &lt;h1&gt;Product List&lt;/h1&gt;



   &lt;div id="content"&gt;
        &lt;!-- display a table of products --&gt;
        &lt;h2&gt;&lt;?php echo $name; ?&gt;&lt;/h2&gt;
        &lt;table&gt;
            &lt;tr&gt;
                &lt;th&gt;Code&lt;/th&gt;
                &lt;th&gt;Name&lt;/th&gt;
                &lt;th class="right"&gt;Version&lt;/th&gt;
                &lt;th&gt;&amp;nbsp;&lt;/th&gt;
            &lt;/tr&gt;

            &lt;?php foreach ($products as $product) : ?&gt;
            &lt;tr&gt;
                &lt;td&gt; &lt;a href="?action=view_product&amp;amp;product_id=&lt;?php echo $product['productCode']; ?&gt;"&lt;/a&gt;&lt;/td&gt;
                &lt;td&gt;&lt;?php echo $product['name']; ?&gt;&lt;/td&gt;
                &lt;td class="right"&gt;&lt;?php echo $product['version']; ?&gt;&lt;/td&gt;
                &lt;td&gt;&lt;form action="." method="post"&gt;
                    &lt;input type="hidden" name="action"
                           value="delete_product" /&gt;
                    &lt;input type="hidden" name="productCode"
                           value="&lt;?php echo $product['productCode']; ?&gt;" /&gt;
                    &lt;input type="submit" value="Delete" /&gt;
                &lt;/form&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;?php endforeach; ?&gt;
        &lt;/table&gt;
        &lt;p&gt;&lt;a href="?action=show_add_form"&gt;Add Product&lt;/a&gt;&lt;/p&gt;
        &lt;/br&gt;

    &lt;/div&gt;

&lt;/div&gt;
&lt;?php include '../view/footer.php'; ?&gt;
</code></pre>
