<?php
$i = 0;
while($rows = mysqli_fetch_array($result))
{
if($i % 4 === 0) {
echo "<ul>";
}
$i++;
?>
<li><img src="<?php echo $rows['images'] ?>" /></li>
<p><?php echo $rows['brand'] ?></p>
<?php echo "</li>";
if ($i % 4 === 0) {
$i = 0;
echo "</ul>";
}
}
?>
Here is CSS code
<style>
li,p{
display:inline-block;
}
</style>
The speech in <p>
appears beside the image, but I want it to be under the image. How can this be achieved?