How does php judge whether there is more than enough division between two numbers?
This article mainly explains "php how to judge whether the division of two numbers is more than". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "php how to judge whether the division of two numbers is more than"!
The method of php to judge whether division is redundant: 1. Use the "%" operator to calculate the division of two numbers and get the remaining value. 2. Use the if statement and the operator "! =" to determine whether the residual value obtained is 0. Syntax "if (remainder value! = 0) {/ / division excess} else {/ / division has no remainder}".
Operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
In php to determine whether division is more than sufficient, that is, to determine whether the remainder of division between two numbers is 0.
So we need to first use the "%" operator to find the remainder, and then use the "! =" or "= =" operator to determine whether the remainder is 0.
Implementation code:
At this point, I believe you have a deeper understanding of "php how to judge whether the division of two numbers is more than". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!