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.
Cast it as an int and subtract
$integer = (int)$your_number; $decimal = $your_number - $integer;
Or just to get the decimal for comparison
$decimal = $your_number - (int)$your_number