Voting

: max(zero, five)?
(Example: nine)

The Note You're Voting On

admin AT bobfrank DOT org
20 years ago
Here is a very small zeropadding that you can use for numbers:

function zeropad($num, $lim)
{
return (strlen($num) >= $lim) ? $num : zeropad("0" . $num);
}

zeropad("234",6);

will produce:
000234

zeropad("234",1);

will produce:
234

<< Back to user notes page

To Top