Basically ive written code that looks in a directory and lists all the jpeg files.
I have 13 files however i only want 12 to a page.
- Code: Select all
$pages = $files / 12;
So i want it to set $pages = 2
But it sets $pages = 1.08333333333. which is correct but i want the next integer.
So ive tried
- Code: Select all
$pages = (int) ($no / 12);
but that just sets $pages = 1
can anyone help me to find the next integer?