> > I¹m trying to figure out how to do this but am not sure. > Any help appreciated. > I'm not sure of what you are asking, but I'll assume that because you posted the to the PHP list, that you are asking how to take a MySQL autoincrement number and add leading zeros to it. Try this: $row=mysql_fetch_array($result); $four_digit_id=str_pad($row['id'], 4, "0", STR_PAD_LEFT); JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php