Simple question. I have this code:
total = 41
win = 48
echo ($total/$win) * 100 ;
printing out
85.416666666667
I need to remove the remainder so it prints out: 85 %.
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.
http://www.ideone.com/7JFkI
Depending on how to want to round the number you may need to replace
floor()with one offloor()(9.4 → 9, 9.7 → 9)round()(9.4 → 9, 9.7 → 10)ceil()(9.4 → 10, 9.7 → 10)