Re: [PHP] Oddity

2002-02-04 Thread Mike Maltese
This could be the problem in your for loop: $elementKey = key( $macroDataArray ) - you're using the = assignment operator. Try == or =. Mike - Original Message - From: Chris Boget [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 04, 2002 8:29 AM Subject: [PHP] Oddity

Re: [PHP] Oddity

2002-02-04 Thread Chris Boget
$macroDataArray = mysql_fetch_array( $result ); I'm still curious what is going wrong, but I've found a work arround. One of the things I love about PHP is that you learn something new just about every day. Instead of fetch_array(), I can use fetch_assoc() and it'll do just what I need. :)

Re: [PHP] Oddity

2002-02-04 Thread Mike Maltese
:42 AM Subject: Re: [PHP] Oddity $macroDataArray = mysql_fetch_array( $result ); I'm still curious what is going wrong, but I've found a work arround. One of the things I love about PHP is that you learn something new just about every day. Instead of fetch_array(), I can use fetch_assoc

RE: [PHP] Oddity

2002-02-04 Thread Andrew Chase
You can also do ? $macroDataArray = mysql_fetch_array($result,MYSQL_ASSOC) foreach(array_keys($macroDataArray) as $elementkey){ echo Value for key $elementKey = $macroDataArray[$elementKey]br\n; } ? (mysql_fetch_array uses MYSQL_BOTH for the second argument by default, which