If you need to make it to the nearest multiple of 0.04 here is a function that does the job:
function round_to_0_04($round)
{
$int_val = round($round * 100);
$rest = $int_val % 4;
$rounded_val = $int_val - $rest;
return $rounded_val /100;
}
If the number needs to be uneven (starting from 0.02 instead of 0), you should use it as follows:
$number = ...;
round_to_0_04($number - 0.02) + 0.02;
Or just modify the function as follows:
function round_to_0_04_uneven($round)
{
$round -= 0.02;
$int_val = round($round * 100);
$rest = $int_val % 4;
$rounded_val = $int_val - $rest;
return $rounded_val /100 + 0.02;
}