Page 1 of 1
while and arrays
Posted: Sun Jun 09, 2002 10:19 pm
by Jose Arce
How can i convert the results of a while to array???
Posted: Sun Jun 09, 2002 10:24 pm
by sam
Code: Select all
$arr = array();
while($row = mysql_fetch_assoc($r)){
$arrї] = $row;
}
Cheers Sam
Posted: Sun Jun 09, 2002 10:35 pm
by Jose Arce
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...

Posted: Sun Jun 09, 2002 10:41 pm
by sam
Same principal... Just doump the results of whatever your working on into an array...
Cheers Sam
Posted: Sun Jun 09, 2002 10:47 pm
by Jose Arce
again...super fast sam...thx a lot!
i'll check this later...and i'll tell ya what happend...
THX!
