Determining the last record in a loop

admin

Administrator
Staff member
I have a loop that looks something like this

while($row=db_fetch_array($result))
{
print "$row[sb_num], ";
}

As you can see it places a comma after each result. Is there I way that I can change this code so that on the last record instead of a comma we have a period. Maybe using mysql_num_rows?


thanks,

Luis
 
Back
Top