You can also do
\n";
}
?>
(mysql_fetch_array uses MYSQL_BOTH for the second argument by default, which
returns an array using both numeric and associative keys - that's why you
were getting double results. :))
Per the manual:
--
CTED]>
Sent: Monday, February 04, 2002 8: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
> $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. :)
Ch
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
4 matches
Mail list logo