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 are the functions used in php?
How cookies are transported from servers to browsers?
What is constructor and destructor?
How do you sort an array in php?
What is the use of count() function in php?
What are php magic quotes?
What is put method in php?
Why php is widely used?
Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would we validate whether the field is empty? Print a message "the email cannot be empty" in this case?
What is the difference between Session and Cookie?
What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain?
Does php support multiple inheritances?
for image work which library?
Explain what is the difference between $var and $$var?
Php error constants and their descriptions