PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
kevin7
Forum Commoner
Posts: 96 Joined: Fri May 21, 2004 6:54 am
Post
by kevin7 » Thu Jun 24, 2004 8:28 am
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...
Grim...
DevNet Resident
Posts: 1445 Joined: Tue May 18, 2004 5:32 am
Location: London, UK
Post
by Grim... » Thu Jun 24, 2004 8:40 am
[php_man]ceil[/php_man]()
Grim...
DevNet Resident
Posts: 1445 Joined: Tue May 18, 2004 5:32 am
Location: London, UK
Post
by Grim... » Thu Jun 24, 2004 10:56 am
Um, Round won't turn 3.1 into 4.
launchcode
Forum Contributor
Posts: 401 Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:
Post
by launchcode » Thu Jun 24, 2004 10:57 am
It certainly won't
ceil and floor are the two to use.
Illusionist
Forum Regular
Posts: 903 Joined: Mon Jan 12, 2004 9:32 pm
Post
by Illusionist » Thu Jun 24, 2004 10:59 am
oops! lol i didn't even read his whole post!
Grim...
DevNet Resident
Posts: 1445 Joined: Tue May 18, 2004 5:32 am
Location: London, UK
Post
by Grim... » Thu Jun 24, 2004 11:04 am
Ker-slap!