Page 1 of 1

decimal point problem again...

Posted: Thu Jun 24, 2004 8:28 am
by kevin7
hmm... how can i "round" the value...

3.1 to 4? round cannot do like that because... the number after the decimal point is 1... only number greater than 5 can make the number turn to 4...

which mathematical function should i use?

tq...

Posted: Thu Jun 24, 2004 8:40 am
by Grim...
[php_man]ceil[/php_man]()

Posted: Thu Jun 24, 2004 10:52 am
by Illusionist
[php_man]round()[/php_man]

Posted: Thu Jun 24, 2004 10:56 am
by Grim...
Um, Round won't turn 3.1 into 4.

Posted: Thu Jun 24, 2004 10:57 am
by launchcode
It certainly won't :) ceil and floor are the two to use.

Posted: Thu Jun 24, 2004 10:59 am
by Illusionist
oops! lol i didn't even read his whole post! :P

Posted: Thu Jun 24, 2004 11:04 am
by Grim...
Ker-slap!