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 remove blank spaces from the string?
Why and where do we use htaccess?
How do you identify independent and dependent variables in research?
What is string and its function?
Explain what is smarty?
Can we set session value in javascript?
What is the difference between explode () and split () functions in php?
What are properties in php?
How can we determine whether a variable is set?
What is php7?
How to get number of days between two given dates using PHP?
Why php is also called as scripting language?
What are the benefits of composer?
In how many ways we can retrieve the data in the result set of mysql using php?
How would you declare a function that receives one parameter name hello?