Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199807

Re: [PHP3] error in array internal pointers?? From: Rasmus Lerdorf (rasmus <email protected>)
Date: 07/27/98

> With both the loops, the loop stops when the current($data_array) or the
> next($data_array) comes to the point when the $data_array element
> becomes 0 (zero). Isn't it so that the internal pointer musn't look to
> the value of the element??
> Because now the two last elements (from mine example) aren't displayed!
>
> What am I doing wrong?

The documentation at:
 
   http://www.php.net/manual/function.next.php3

states:

   Warning: if the array contains empty elements then this function will
   return false for these elements as well. To properly traverse an array
   which may contain empty elements see the each() function.

-Rasmus

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3