How to use fmod in PHP

This article describe about fmod() Function in PHP.
  • 1429

fmod() Function

This function divides the value of p by the value of q and returns the remainder of the division.

Syntax

fmod(p,q)

 

Parameter Description
p Define a number.
q Required.

Example

<html>
<body>
<?php
$r = fmod(7,2);
echo $r
?>
</body>
</html>

 

Output


fmodphp.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.