PHP fmod() Math Functions

What is fmod Function?

Explanation

The "fmod()" function returns the floating point remainder (modulo) of the division of the arguments.

Syntax:


fmod(x,y)

In the above syntax "x,y" are the arguments, whose remainder is returned.

Example :


<?php
$r = fmod(7,3);
echo $r
?>
Result :

1

In the above example the numbers "7", "3" are divided and floating point remainder is returned.

PHP Topics


Ask Questions

Ask Question