Hello
I need help on how to divide two integer numbers and get an integer answer (drop the remainder)
Ive been searching all over php.net and google but could find an answer
I need to get something like this:
14 / 11 = 1
40 / 16 = 2
you get the idea
Dropping remainder when dividing
Moderator: General Moderators
Re: Dropping remainder when dividing
You can't do it in the first step (division) but you can do it with a second.
- DigitalMind
- Forum Contributor
- Posts: 152
- Joined: Mon Sep 27, 2010 2:27 am
- Location: Ukraine, Kharkov
Re: Dropping remainder when dividing
Code: Select all
echo (int)(14 / 11);