Foreach($anotherarray as $key=>$value) Tim www.chessish.com <http://www.chessish.com>
---------- From: Daniel Alsén [SMTP:[EMAIL PROTECTED]] 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 # # [EMAIL PROTECTED] | +46 704 86 14 92 # # ICQ: 63006462 | +46 8 694 82 22 # # PGP: http://www.mindbash.com/pgp/ # -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]