hello all,
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
Code JavaScript:
<script type="text/javascript">
for (i = 0; i <= <?php echo $pgno; ?>; i++)
{
document.write('"') 
document.write("pg/bg.php?usr=<?php echo $usr; ?>&pageno="+i)
document.write('",') 
 
}
 
 
</script>

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.
Thanks