This is my partial code:
while($row = $db->fetch_array($query))
{
echo $row['row_name'];
}
How can I make it so it will add a break tag after each result, but not the last result?
Put the output into an array, then join the array with implode
:
$rows = array();
while($row = $db->fetch_array($query))
{
$rows[] = $row['row_name'];
}
echo implode('<br/>', $rows);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With