<?Php
echo fmod(5,2); // Output 1
echo "<br>";
echo fmod(10,2); // Output 0
echo "<br>";
echo fmod(13,2); // Output is 1
echo "<br>";
echo fmod(6,3); // Output is 0
?>
Syntax
float fmod(float $X,float $y);
$X is the dividend
Author
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.