How do you format and output a number with leading zero's?
Answer Posted / mahesh
$d=450;
$d = str_pad($d,6,0,0);
echo $d;
OUT PUT
000450
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Explain Booleans in PHP?
What is die in php?
Explain what is memcache?
Tell me how can we pass the variable through the navigation between the pages?
What is $row in php?
What is php built on?
What is the difference between print() and echo() in PHP?
Is numeric in php?
How to break a file path name into parts?
What is the default time in seconds for which session data is considered valid?
Tell me what are the __construct() and __destruct() methods in a php class?
What's php?
What is factory pattern in php?
How the result set of mysql be handled in php?
Can we embedded directly PHP code into XHTML document? State Whether True or False?