SV: SV: [PHP] Re: Still need help with miscount
| From: | Daniel Alsén | Date: | Sun, 06 Jan 2002 12:11:11 +0000 |
| Subject: | SV: SV: [PHP] Re: Still need help with miscount | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-79605@lists.php.net to get a copy of this message | ||
> I don't know if this is actually it, but the line
> $num_vals[$i] = mysql_fetch_array($result);
> seems strange to me - doesn't mysql_fetch_array return an array?
> You should try
> list($num_vals[$i]) = mysql_fetch_array($result);
> and see if you get any improvements...
No, that was not it. It gave me different results - but still wrong.
I have, however, got a little closer by extending the loop to 0-11,
for ($i=0; $i<11; $i++), and changing the display, starting with: echo
$num_vals[1][0];;. I had alla numbers shifted one step to the right before
when counting zeroes as well.
But - still the same problem. It doesn´t count correctly - and i can´t
figure out why...
- Daniel