I want to display 10 products from each category from database, I started to display the categories but how to make displaying the products from each one.
Here is the code I make so far. I'm not sure am I doing it right with doble sql select , or it can be done only with one.
<div class="inner shadow">
<?php
$query = 'SELECT id,
title_bg AS `title_cat`
FROM categories';
$result = $this->db->query($query);
?>
<?php foreach ($re