Thanks Craig, that worked!

I wonder why the other suggestions weren't working. They seemed logical
enough, I even tried variations of your suggestion, first I tried:

for ($i=1; $i<=$num_pages; $number = $i + 20) {}

That wasn't working, still was getting the 30 second timeout. Then I tried:

for ($i=1; $i<=$num_pages;) { $number = $i + 20; }

Since the manual says any of the expressions can be left blank. That still
executed beyond the 30 seconds and timed out.

Anyways, your suggestion is MUCH faster! Thanks for everyone's help -

Jason

-----Original Message-----
From: Craig Vincent [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 7:36 PM
To: Jason Soza; [EMAIL PROTECTED]
Subject: RE: [PHP] Feelin' dumb...


> For each loop, I want to add 20 to $i, so after the first
> iteration, I have
> 21, then 41, 61, etc. I've tried $i+20, $i + 20, I've tried looking in the
> manual, but I assume this is some C-type function, and I'm not
> familiar with
> C!

Well this is a bit of a detour from the other suggestions however since you
haven't gotten a successful solution yet how about

for ($i=1; $i<=$num_pages; $i++) {
        $number = ($i * 20) + 1;
        // print stuff here
        }

The results would be $number = 21 on first run, then 41, then 61 etc (which
I believe is what you are looking for).  Note the parenthesis in the $number
line are not needed however I typically code with them as it makes it easier
to understand the code with less though =)

Sincerely,

Craig Vincent



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to