This function is used to find a number whether the number is multiple of another number or not
<?php
function is_multiple($num, $mult){
if($num % $mult == 0)
return true;
else
return false;
}
var_dump(is_multiple(200, 100));
var_dump(is_multiple(110, 100));
var_dump(is_multiple(1000, 100));
?>
function is_multiple($num, $mult){
if($num % $mult == 0)
return true;
else
return false;
}
var_dump(is_multiple(200, 100));
var_dump(is_multiple(110, 100));
var_dump(is_multiple(1000, 100));
?>
0 comments:
Post a Comment