> I think I see the error here. > > if ($num_pages >= 2) { > for ($i=1; $i<=$num_pages; $i++) { > $number = ($i * 20) + 1; > printf("| <a > href=\"test.php?page=%s\">Page %s</a> | ", $number, > $i); > } > } > > Is ALMOST right... Except that the I need the first iteration to return 1. > In this 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!
Easy fix =) Put the $number = ($i * 20) + 1; at the end of your for loop so it is the last thing done prior to starting a new loop. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php