Language: PHP
What are the things to round, so like if
$iteminfo[cost] == 100;
and we were to do:
$sellprice = $iteminfo[cost] / 6;
How do we do a round UP and a round down, I cant seem to find it in the docs at php.net...... Probably cuz I dunno wht it would be under, but I checked like everything under variables >.< So ya, if anyone could help, please do ^^;
-Moo-
Just do some tricks with modulo:
if( $iteminfo[cost] % 6 > 2 ) $sellprice = $iteminfo[cost] / 6 + 1;else $sellprice = $iteminfo[cost] / 6;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement