Given, say, 1.25 - how do I get \"1\" and .\"25\" parts of this number?
I need to check if the decimal part is .0, .25, .5, or .75.
a short way (use floor and fmod)
$var = "1.25"; $whole = floor($var); // 1 $decimal = fmod($var, 1); //0.25
then compare $decimal to 0, .25, .5, or .75