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.
This is the way which I use:
$float = 4.3; $dec = ltrim(($float - floor($float)),"0."); // result .3