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
Which is not a php magic constant?
What are the final class and final method?
What are php filters?
What is the functionality of the functions strstr() and stristr()?
Which function will you use to create an array?
What is strlen function in php?
What are headers in php?
What is delimiter php?
How to find datatype of variable in php?
What's the best method for sanitizing user input with php?
What are the different ways to login to a remote server?
Which function Returns the time of sunrise for a given day / location in PHP.
What the use of var_dump()?
Can I write php code in html file?
Explain how is it possible to cast types in php?