Hi Sevenfive
I found the following function contributed by an unknown user to the page on number_format.
<?php
// $num = 4; $zerofill= 3; returns "004"
function zerofill ($num,$zerofill) {
while (strlen($num)<$zerofill) {
$num = "0".$num;
}
return $num;
}
?>
I do, however, suggest you use the built-in functions of the MySQL DB to save having to code this kind of functionality yourself. Giving someone or something an ID which only exists within a dynamic PHP variable is not a great idea. Unless of course these IDs are only temporary.
HTH
Norm