I have a table. My table like below.
id | product_name | price
and i have list view. I want to get data and fill like this.
<div class="container">
<div class="row">
<div class="col s4">product_name (first)</div>
<div class="col s4">product_name (second)</div>
<div class="col s4">product_name (third)</div>
</div>
<div class="row">
<div class="col s4">product_name (fourth)</div>
<div class="col s4">product_name (fifth)</div>
<div class="col s4">product_name (sixth)</div>
</div>
</div>
How can i do that?
I try mysqli_fetch_assoc but I want to fill columns in the rows ordered data from my table.
You can achieve this by using the modulus operator.
https://3v4l.org/vKrf9
Result: