The fmod() function Returns the modulo of dividend/ divisor. Floating modulo in fmod.
Syntax
fmod(dividend/ divisor)
Parameters
dividend − The number to be divided.
divisor − This is the number that divides.
Return
The fmod() function Returns the remainder of dividend/ divisor.
Example
<?php $p = 30; $q = 9; $remainder = fmod($p,$q); echo $remainder; ?>
Output
3