%01.2f
I know “.2” is the precision, but what does the 1st part mean – %01 ?
I tried changing it to 05, 2 etc and the resulted string looks the same..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That is how much spacing is there. It’s back from printf in C. Looking up printf would give you more information. However, it’s simple enough to explain here.
I am guessing that the reason it doesn’t do anything is because HTML doesn’t allow more than 1 consecutive space and so it doesn’t show up but if you ran your PHP in a command line (it’s possible) then you would see the spacing appear.
For instance in C (php is basically a C language for the web) you could say
And that would print out something like this
in normal html it should show as this (not in a ‘code block’) : Hello World!
^^ That is spaced the same in the code btw.