Is it possible to find when is the last loop of :
$stmt = $connection->stmt_init();
if ($stmt->prepare("SELECT `ProductId` FROM Products"))
{
$stmt->execute();
$stmt->bind_result($product_id);
while($stmt->fetch())
{
if ($lastloop)
{
echo 'The last id is -> ';
}
echo $product_id.'<br />';
}
}
I want to output something like :
1
2
...
9
The last id is -> 10