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
How to get ip address of clients machine?
Tell me how would you declare a function that receives one parameter name hello?
Which array function checks if the particular key exists in the array?
How to get number of days between two given dates using PHP?
Explain what is the main difference between require() and require_once()?
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what is the problem?
What is the array in php?
What is use of header() function in php?
How do I run a php program in dreamweaver?
How do we get the current session id?
How to create and destroy cookies in php?
What are session variables in php?
What is an object in php?
What is the best website to learn php?
Tell me how can we change the maximum size of the files to be uploaded?