Mega Code Archive

 
Categories / Php / Code Snippets
 

Add zeroes to the front of a number

<?php $test = 15; printf("%03d", $test); printf("%06d", $test); ?>