How do you format and output a number with leading zero's?
Answer Posted / pradeep
Using sprinf("%04d",$num);
The above function will return a number of length 4.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is the output of the ucwords function in this example?
Explain me what is the use of 'print' in php?
Explain about PHP filter and why it should be used?
Tell me what does the initials of php stand for?
How to get no of arguments passed to a PHP Function?
How is session id stored in browser?
What is meant by variable variables in php?
What is Type hinting in PHP?
Does browser understand php?
Explain me what is the goto statement useful for?
Is empty in excel?
How can we enable error reporting in php?
What is difference between rest api and restful api?
What are php functions?
Tell me what should we do to be able to export data into an excel file?