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
Which function is used in php to check the data type of any variable?
What is the use of rand() in php?
Where is my php ini file?
What is meant by urlencode and urldecode?
How to get the length of string?
Write a query to find the 2nd highest salary of an employee from the employee table?
What is the sign to start variables in PHP?
Is php a float?
What is the purpose of $_ session?
How do you check if a variable has not been set in php?
Explain what are the three classes of errors that can occur in php?
Is php object oriented?
Why is node js better than php?
What does nan stand for computer science?
What the difference between the 'bitwise and' operator and the 'logical and' operator?