Returns the floating point remainder of x/y:
<?php$x = 7;$y = 2;$result = fmod($x,$y);echo $result;// $result equals 1, because 2 * 3 + 1 = 7 ?>The fmod() function returns the floating point remainder of x/y.
fmod( x,y );
| parameter | describe |
|---|---|
| x | Required. Specifies the dividend. |
| y | Required. Specifies the divisor. |
| Return value: | Floating point remainder of x/y. |
|---|---|
| Return type: | Float |
| PHP version: | 4.2+ |