Say I have the two following numbers:
$a = 77.5;
$b = 74.5;
How would I get the following:
$a = 80;
$b = 70;
I have looked at round, ceil and floor but I can’t figure out how to do it.
Thank you.
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.
PHP supports negative precision for its
roundfunction:it’s pretty much the same as writing: