<h2>Listing Products</h2> <br> <?php if ($products): ?> <table class="zebra-striped"> <thead> <tr> <th>Product</th> <th>Description</th> <th>Category</th> <th></th> </tr> </thead> <tbody> <?php foreach ($products as $product): ?> <tr> <td><?php echo $product->product_name; ?></td> <td><?php echo $product->product_description; ?></td> <td><?php echo $product->category_id; ?></td> <td> <?php echo Html::anchor('products/view/'.$product->id, 'View'); ?> | <?php echo Html::anchor('products/edit/'.$product->id, 'Edit'); ?> | <?php echo Html::anchor('products/delete/'.$product->id, 'Delete', array('onclick' => "return confirm('Are you sure?')")); ?> </td> </tr> <?php endforeach; ?> </tbody> </table>
It looks like you're new here. If you want to get involved, click one of these buttons!