in reply to Re^2: condensing code
in thread condensing code
Um, technically this won't work either for $total_nums = 1, much as friedo's version doesn't work for $total_nums values of 30, 60, 90, etc., based on the OP's original code. Looks like diotalevi's example using ceil() is better.
Update: Ah, I see you updated your version to add 1 after getting the int() value. Fine.
(Blush)Another Update: Uh, actually, not fine. Now yours doesn't work for values of 31, 61, etc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: condensing code
by derby (Abbot) on Sep 08, 2006 at 18:21 UTC | |
by ptum (Priest) on Sep 08, 2006 at 20:00 UTC |