PHP 문자수 자리 고정
웹프로그램1로 넘어오는 변수를 "001"로 세자리수 맞춤.
$sj_src=sprintf("%03d", $vl_no);
######
To have a string with leading zeros use this:
$string_i = sprintf("%04s",$value)
Gives you an output with leading zeros and 4 digits.
i.e.
0001
0002
...
0010
an so on
댓글을 달아 주세요