Member
arnoldo.moen
How to add 0 in front of number in PHP?
dmitrypro77
@arnoldo.moen use str_pad() function to add 0 in front of any number in PHP, code:
1 2 3 4 5 6
<?php $num = 25; // Output: 025 echo str_pad($num, 3, '0', STR_PAD_LEFT);