I was wondering is it possible to echo out a link that also contains php? It will be a link to add items to a cart.
I suspect I may have missed quotations or simply structured the link wrong.
<table>
<tr>
<th>SKU</th>
<th>Name</th>
<th>Price</th>
<th>Action</th>
</tr>
<?php foreach ($products as $key => $product) {
echo '<tr>';
echo '<td>' . $product['SKU'] . '</td>';
echo '<td>' . $product['name'] . '</td>';
echo '<td>' . '£'. number_format($product['Price'],2) . '</td>';
echo '<td>' . <a href="?action=addToCart&product=<?php echo $key; ?>">Add To Cart </a> . '</td>';
echo '</tr>';
}
?>
</table>