Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

padding number in php

$number = 12;
$width = 4;
$padded = str_pad((string)$number, $width, "0", STR_PAD_LEFT); 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #padding #number #php
ADD COMMENT
Topic
Name
2+3 =