Re: Array
| From: | _lallous | Date: | Mon, 29 Oct 2001 08:27:07 +0000 |
| Subject: | Re: Array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-72688@lists.php.net to get a copy of this message | ||
> $values[$i]['id'] = $co_id;
you didn't initialize the $i did you?
should put $i =0; before the while loop.
> echo "$id<br>" ; # Doesnt wanna work
what is $id ? i don't see it defined in your code, i see $cid instead.
> list($a,$b,$c,$d) = $values[$i];
sure won't work, try:
list($a,$b,$c,$d) = each($values[$i]);
"De Necker Henri" <deNeckerH@ford.co.za> wrote in message
news:3A8ED7A62794D311AA7700508B6164EC08DCA35F@SCPTS01...
> Now i did the following :
> My output is only null or blank values!,but my data is there!
>
> while($row=db_range()){
> list($co_id,$surname,$init,$ba) = $row;
> echo "$co_id $surname<br>"; # This works perfect!
> $values[$i]['id'] = $co_id;
> $values[$i]['surname'] = $surname;
> $values[$i]['init'] = $init;
> $values[$i]['ba'] = $ba;
> $cid = $values[$i]['id'];
> echo "$id<br>" ; # Doesnt wanna work
> list($a,$b,$c,$d) = $values[$i];
> echo "$a" ; # Doesnt wanna work
> $i++;
> }//end while 1