RE: [PHP] Feelin' dumb...

2002-05-18 Thread Jason Soza
--Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 8:47 PM To: Jason Soza; PHP General Subject: Re: [PHP] Feelin' dumb... Ok Im feeling dumb also now *hehe* What I said about putting the $number line below the printf line.. Don¹t listen to me

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
is case, it returns 21, so the next iteration is 41. Follow me? I need > 1, 21, not 21, 41. Almost there I think, unfortunately, I need to jet. I'll > be thinkin' on this one while DJing, definitely! > > Thanks again for everyone's help. > > -Original Messa

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
> I think I see the error here. > > if ($num_pages >= 2) { > for ($i=1; $i<=$num_pages; $i++) { > $number = ($i * 20) + 1; > printf("| href=\"test.php?page=%s\">Page %s | ", $number, > $i); >

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
> I think I figured this out - > > Since I only have 2 pages, the first iteration of the loop sets $i greater > than than the number of pages, i.e. $i becomes 21, which is > greater than 2, > so the second iteration stops there. Am I seeing this right? > > So Craig's way worked because $i was left

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
TECTED]> > Date: Fri, 17 May 2002 20:44:30 -0800 > To: "Richard Baskett" <[EMAIL PROTECTED]>, "PHP General" > <[EMAIL PROTECTED]> > Subject: RE: [PHP] Feelin' dumb... > > The 20 is inserted into a MySQL LIMIT query. Page 1 = LIMIT 1,20 t

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
Friday, May 17, 2002 8:30 PM To: Jason Soza; PHP General Subject: Re: [PHP] Feelin' dumb... That means $num_pages is equal to 2 so yes the if statement is true and it goes onto the the for loop. Now where you are having problems is on the second expression in the for loop.. This expression i

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
past be the WORST of your future" - Unknown > From: "Jason Soza" <[EMAIL PROTECTED]> > Date: Fri, 17 May 2002 20:23:53 -0800 > To: <[EMAIL PROTECTED]> > Subject: RE: [PHP] Feelin' dumb... > > When I use that, here: > > if ($num_pages >=

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
al Message- From: Jason Soza [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 8:24 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Feelin' dumb... When I use that, here: if ($num_pages >= 2) { for ($i=1; $i<=$num_pages; $i+=20) {

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
- From: Tom Rogers [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 7:40 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Feelin' dumb... Hi What you need is for ($i=1; $i<=$num_pages; $i+=20) { // print stuff here } Tom At 01:19 PM 18/05/2002, Jason Soza wrote: >Okay, I'm

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
streetsweeper who did his job well." - Dr. Martin Luther King, Jr. > From: "Jason Soza" <[EMAIL PROTECTED]> > Date: Fri, 17 May 2002 20:09:55 -0800 > To: <[EMAIL PROTECTED]> > Subject: RE: [PHP] Feelin' dumb... > > Makes sense. Thanks! >

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
ut $page = and put in $i where $page is in the printf() statement, I get the extra iteration again. Any ideas? -Original Message- From: Craig Vincent [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 7:56 PM To: Jason Soza; [EMAIL PROTECTED] Subject: RE: [PHP] Feelin' dumb...

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
> 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) {} > for ($i=1; $i<=$num_pages;) { $number = $i + 20; } The problem with these two statements was that t

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
- 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,

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Tom Rogers
Hi What you need is for ($i=1; $i<=$num_pages; $i+=20) { // print stuff here } Tom At 01:19 PM 18/05/2002, Jason Soza wrote: >Okay, I'm apologizing right now for this, but I hope it's at least >tolerable. I have this: > >for ($i=1; $i<=$num_pages; $i++) { > // print stuff here >

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
3:25 -0400 > To: Richard Baskett <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > Subject: Re: [PHP] Feelin' dumb... > > for ($i=1; $i<=$num_pages; $i+20) { >> // print stuff here >> } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
> 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 suggesti

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
.. Then it times out. -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 7:15 PM To: Jason Soza; PHP General Subject: Re: [PHP] Feelin' dumb... Hmm... Wouldn¹t you just do this?: for ($i=1; $i<=$num_pages; $i+20) { // print stuff here

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Jule
gt; // print stuff here > } > > Rick > > "The vision must be followed by the venture. It is not enough to stare up > the steps - we must step up the stairs." - Vance Havner > > > From: "Jason Soza" <[EMAIL PROTECTED]> > > Date: Fri, 17

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
OTECTED]> > Date: Fri, 17 May 2002 19:19:28 -0800 > To: <[EMAIL PROTECTED]> > Subject: [PHP] Feelin' dumb... > > Okay, I'm apologizing right now for this, but I hope it's at least > tolerable. I have this: > > for ($i=1; $i<=$num_pages; $i++) { &g

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Jule
try, for ($i=1; $i<=$num_pages; $i = $i + 20) { } or try, $i = 1; while ($i<=$num_pages) { //text here $i = $i + 20; } I got those little problems too all the time.. and the boards/lists always help. Jule On Friday 17 May 2002 23:19, you wrote: > Okay, I'm apologizing right n

[PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
Okay, I'm apologizing right now for this, but I hope it's at least tolerable. I have this: for ($i=1; $i<=$num_pages; $i++) { // print stuff here } 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 tr