Hi,
I'm currently writing a script, which needs to do this...
Echo all the names on character 1 (a), page 1 > move to page 2, do the same, then keep doing that for 50 pages
Then when its echo'ed all the names off all the pages starting with "a", move onto "b", do the same as before, echo all the names, for all the pages
The do the same for c,d,e,f,g....etc..
This is my code (its edited so it doesnt take forever to test! ):
Now, whats wrong with it? It does "a" page 1 fine, but never moves on to page 2, etc....PHP Code:<?php
$char = 97;
$page = 1;
$no=0;
while($char <= 100){
$pageno = 50;
while($page <= $pageno){
$result = 50;
while($no <= $result){
if($no == $result){
$page++;
break;
}else{
// heres where the normal code to echo each name would go
echo'Done #'.$no.' for letter '.chr($char).'<br>';
$no++;
}
if($page == $pageno){
echo'Done All the pages for '.chr($char).', moving onto '.chr($char+1).'<br>';
$char++;
$page=1;
}
}
}
}
?>
On the code above, you are meant to get a list of text like this:
Done #0 for letter a
Done #1 for letter a
Done #2 for letter a
Done #3 for letter a
...#4-47...
Done #48 for letter a
Done #49 for letter a
Done #50 for letter a
Done All the pages for a, moving onto b
Done #0 for letter b
Done #1 for letter b
Done #2 for letter b
Done #3 for letter b
...#4-47...
Done #48 for letter b
Done #49 for letter b
Done #50 for letter b
Done All the pages for b, moving onto c
etc...
But from what I can tell, its not moving to the next page...
Anyone know why?
CHEERS in advance!
fLUx









Bookmarks