Could anyone please tell me why this happens,
$a = 0.000022
echo $a // 2.2E-5
What I want to see is 0.000022 not 2.2E-5
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.
The exponential form is the internal one use by every (?) programming language (at least CPUs “sees” floats this way). Use
sprintf()to format the outputSee Manual:
sprintf()about more information about the format parameter.