I mean when I use normal loop, it can set the start of $i = 0; or $i = any value that I want. But,Is it possible to loop through fetch array be set the start row? for example, if I want to start from third row of database (not start from first row).
$sql = "SELECT * FROM slice_img ORDER BY id";
$result = mysqli_query($con, $sql);
while($data = mysqli_fetch_array($result))
{
echo "<div style='width:627px; margin:auto; padding-bottom: 5%;' class='container zeroBorder'>";
$text = $data['gen_number'];
$subfile = substr($text, ($i*2), 2);
echo '<img src="folder'.$data['id'].'/crop'.$subfile.'.jpg" class="zeroBorder" border="0" />';
echo "</div>";
}
and Do I need to use the fetch $id instead of $i ? the above code, you can notice the echo img src folder fetch$id, actually I would like to write folder.$i but I don't have normal loop for.
folder.$iOFFSETshould do the trick, whereas even (slightly) improving performance since less data has to be transferred.