PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Jose Arce
Forum Commoner
Posts: 37 Joined: Wed May 01, 2002 5:05 pm
Post
by Jose Arce » Sun Jun 09, 2002 10:19 pm
How can i convert the results of a while to array???
sam
Forum Contributor
Posts: 217 Joined: Thu Apr 18, 2002 11:11 pm
Location: Northern California
Contact:
Post
by sam » Sun Jun 09, 2002 10:24 pm
Code: Select all
$arr = array();
while($row = mysql_fetch_assoc($r)){
$arrї] = $row;
}
Cheers Sam
Jose Arce
Forum Commoner
Posts: 37 Joined: Wed May 01, 2002 5:05 pm
Post
by Jose Arce » Sun Jun 09, 2002 10:35 pm
wow that was fast..thx sam but i'm not using a database i'm using something like this:
while (++$i <= 10) {
hope its enough for you to understand...
sam
Forum Contributor
Posts: 217 Joined: Thu Apr 18, 2002 11:11 pm
Location: Northern California
Contact:
Post
by sam » Sun Jun 09, 2002 10:41 pm
Same principal... Just doump the results of whatever your working on into an array...
Cheers Sam
Jose Arce
Forum Commoner
Posts: 37 Joined: Wed May 01, 2002 5:05 pm
Post
by Jose Arce » Sun Jun 09, 2002 10:47 pm
again...super fast sam...thx a lot!
i'll check this later...and i'll tell ya what happend...
THX!