Results 1 to 4 of 4
Thread: using a for loop
May 25, 2008, 06:12 #1
- Join Date
- Jul 2007
- 0 Post(s)
- 0 Thread(s)
using a for loop
basically i have a script that i'm modifying and i'm trying to list a couple urls dynamycally.
the format i need is;
page=["pg/bg.php?usr=13&pageno=1", "pg/bg.php?usr=13&pageno=2", "pg/bg.php?usr=13&pageno=3", "pg/bg.php?usr=13&pageno=4"]
As you can see its just seperating each url with a comma and each url in quotes "". The only thing that changes is the pageno. I have the total number of pages in a php variable so i thought i could use a for loop like the following
On its own the above prints out everything the way i want it to but I don't know how to use the for loop when doing page=
in other words i don't know how to put the urls into page since its a loop am almost sure i can't just go page= or (i = 0; i <= <?php echo $pgno; ?>; i++)....etc
Not sure if am making sense, hopefully i am and any help would be greatly appreciated.