RE: While on array?
| From: | Tim Ward | Date: | Mon, 21 Jan 2002 09:55:20 +0000 |
| Subject: | RE: While on array? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-81339@lists.php.net to get a copy of this message | ||
Foreach($anotherarray as $key=>$value)
Tim
www.chessish.com <http://www.chessish.com>
----------
From: Daniel Alsén [SMTP:d@mindbash.com]
Sent: 20 January 2002 20:30
To: PHP List
Subject: While on array?
Hi,
i am fiddling with a script and need to change a while-loop from
running on
mysql_fetch_array to a "normal" array?
ie - i have:
while($myrow=mysql_fetch_array($result)) { etc...
But i want the loop to run with an array i created earlier
($anotherarray =
[key1] => value1, [key2] => value2).
How would i do that? Does the loop behave the same way - running
until the
array is out of data?
Thanks!
# Daniel Alsén | www.mindbash.com #
# d@mindbash.com | +46 704 86 14 92 #
# ICQ: 63006462 | +46 8 694 82 22 #
# PGP: http://www.mindbash.com/pgp/ #