I have this php
<?php echo round($price, 2); ?>
and the $price maybe 1.0000
i want 1.00 but i get only 1
any ideas
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 following
printf()call should work for you:The documentation for this syntax is best described on the
sprintf()page.