We know 10 % 3 is 3.3333333333333333333333333.
if i use echo 10 % 3, it return 1 not 3.3333333333333333333333333.
Now how to get float value from modulus in PHP? is possible to get 3.3333333333333333333333333?
Thanks.
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’s incorrect.
We know that
10 / 3is3.3333..., notice that is/(division) not%(modulus).The reason
10 % 3is1is because3goes into103times with a remainder of1.