Good day to all. Something I can not figure out how to do this rounding.
Tried to do a check on the remainder of the division (%), if it is equal to 0. then further with the help of ceil () round up. It turns out not what you need :)
if (($val_get % $pack_val) == 0) $val_get = ceil($val_get/$pack_val); else $val_get = $pack_val; Here is what I wrote. It is necessary to provide the case that if $pack_val > $val_get . The remainder is obtained equal to $val_get in case $pack_val > $val_get . Help me please :)