tags:

views:

36

answers:

2

Welcome, I would like to round up poll answers, but i can't get it working.

When i try to round_up and ceil, but get 10x percents (over 100% most 101%).

This is Example values

33.3333333333 
16.6666666667
50

Any idea ?

+2  A: 

why not just use round() ?

it should result in: 33 17 50

Sabeen Malik
+2  A: 
round(33.3333333333, 2); //result: 33.33
round(16.6666666667, 2); //result: 16.67
round(50, 2); //result: 50
aularon
+1 but based on what he is using already, he just wants the integer part.
Sabeen Malik
You have right, it's working great.
marc
My foult, i was using "round up".Thank you very much ;)
marc
You are welcome. Don't forget to choose accepted answers for your questions, your acceptance rate is low, try to keep a high acceptance rate by choosing accepted answers for your questions : )
aularon