You can use some of the various math functions to round the number to a whole number, making it easier to work with.
For example:
round(x) will round to the nearest whole number.
round(2.8) will return 3.
An example in code could be something like:
$variableiamusing = 2.8;
$adjustedvariable = round($variableiamusing);
You can also use floor(x) to round downwards or ceil(x) to round upwards.