PHP - Creating a simple array
Posted
by danit
on Stack Overflow
See other posts from Stack Overflow
or by danit
Published on 2010-03-31T12:15:59Z
Indexed on
2010/03/31
12:23 UTC
Read the original article
Hit count: 356
php
Yes I'm a n00b!
Now thats out of the way, I have the following code:
$page=3;
$i=1;
while($i<=$pages) {
$urls .= "'"."http://twitter.com/favorites.xml?page=" . $i ."',";
$i++;
}
What I need to create is this array:
$data = array('http://twitter.com/favorites.xml?page=1','http://twitter.com/favorites.xml?page=2','http://twitter.com/favorites.xml?page=3');
How can I produce an array from the 'while' loop?
© Stack Overflow or respective owner