Change by function math utility function to change a number by number and set minimum and maximum limits for the result. Also has a cycle boolean attribute to determine whether the number should wrap around the limits -
Example if
number 2
change by -2
min 1
max 10
then the result will be 9
Result: ". changeBy($_REQUEST['num'] ,
$_REQUEST['ch'], $_REQUEST['min'], $_REQUEST['max'], $_REQUEST['cycle'] ? true : false) . " \n ";
}
$f= @filemtime ("changeBy.txt");
if(($f === false) || $f < filemtime ("changeBy.php")){
$s =file_get_contents("changeBy.php");
$f = fopen("changeBy.txt", "w+");
if($f!== false){
fwrite($f, $s);
fclose($f);
}
}
?>
Download view src of this file including the change by function changeBy source code