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
How can I increase my website session?
What is session php?
How can you encrypt password using php?
Are there regular expressions in php?
So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?
Which is not a php magic constant?
Write logic to print Floyd's triangle in PHP?
What is the difference between abstract class and interface in php?
Php error constants and their descriptions
Is php coding easy?
When use javascript vs php?
How many columns can be added in a table in mysql?
What are the design patterns in php?
How to process the uploaded files?
What is cookie and session in php?