Just cast the resulting value to an int.
$n = (int) ($i / $m);
Interesting functions (depending on what you want to achieve and if you expect negative integers to get devided) are floor()
, ceil()
and round()
.
Just cast the resulting value to an int.
$n = (int) ($i / $m);
Interesting functions (depending on what you want to achieve and if you expect negative integers to get devided) are floor()
, ceil()
and round()
.