How do you format and output a number with leading zero's?
Answer Posted / mahesh
$d=450;
$d = str_pad($d,6,0,0);
echo $d;
OUT PUT
000450
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is session in PHP. How to remove data from a session?
What is laravel php?
Write a program to get lcm of two numbers using php?
What is the delimiter default in PHP?
Explain me what is the difference between explode() and split() functions?
Who developed php?
Which function is used to strip whitespace?
What is an anti csrf token?
How to count all the lines of code in a directory and sub folder?
Explain me what is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?
Is java is better than php?
What is the importance of "method" attribute in a html form?
What is difference between required and require_once in php?
What is the difference between php and javascript?
What is the use of array_count_values() in php?