English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

fmod() function in PHP

Thisfmod()The function returns the dividend/The modulus of the divisor. The floating modulus in fmod.

Syntax

fmod(dividend/ divisor)

Parameter

  • Dividend-the number to be divided.

  • Divisor-This isDivisor.

returns

Thisfmod()The function returns the divisor/The remainder of the divisor.

Example

<?php
   $p = 30;
   $q = 9;
   $remainder = fmod($p, $q);
   echo $remainder;
?>

Output Result

3