I’ve putted a script together a bit with array’s and stuff.
Now in the end, it checks for a score with checkboxes and divides it by ten.
Then with number format i round it off two 2 decimals, it looks like this.
$number = $score / $total;
$number = $number * 10;
$number = number_format(round($number,2),2,',','.');
echo "The number is: $number <br/>";
Then later on, i’m doing this.
if($number < 4 && $number > 0)
echo 'You're number is between zero and 4';
else if($number > 6 && $number < 4)
echo ' You're number is between 4and 6';
else if($number < 8 && $number > 6)
echo' You're number is between 6 and 8';
else if($number < 10 && $number > 8)
You're number is between 8 and 10';
Now, if the number is like, 0.50 or 1.50 or 2 or 5.50 it’s shows the text i’ve provided.
However, if the number is like 4,13 or 7,85 or 9,13 it doesn’t.
Searched now quite a while but can’t figure it out.
Do you people see a solution?
Hope i was clear enough!
Thanks in advance.
Is this what you’re looking for?