Re: Unusual Array Results
| From: | Andrew Kreps | Date: | Wed, 06 Oct 2004 00:48:35 +0000 |
| Subject: | Re: Unusual Array Results | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-36645@lists.php.net to get a copy of this message | ||
On Tue, 5 Oct 2004 17:40:54 -0700, Wendell Frohwein
<wendell@3rdpixel.com> wrote:
> Here is that inradius function:
>
I think I see your problem. The counter isn't initialized. Try
sticking $i = 0 right here:
if($db->affected_rows()<>0) {
$i = 0;
while($db->next_record()) {
and see if that works. The variable $i appears to be undefined on the
first iteration of the while loop, which would explain why your first
array index is null. Give it a shot, and let me know how it goes.