Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

show number 1 as 00001 laravel

$number = 51;
$number = sprintf('%04d',$number);//4 number total no
print $number;
// outputs 0051
//

$number = 8051;
$number = sprintf('%04d',$number);
print $number;
// outputs 8051
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #number #laravel
ADD COMMENT
Topic
Name
2+3 =