Re: Question - foreach.
| From: | Adam Richardson | Date: | Thu, 10 Jun 2010 01:59:23 +0000 |
| Subject: | Re: Question - foreach. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306000@lists.php.net to get a copy of this message | ||
On Wed, Jun 9, 2010 at 9:49 PM, Shreyas <shreyasbr@gmail.com> wrote:
> PHP'ers,
>
> I am reading a PHP book which explains foreach and at the end says : *'When
> foreach starts walking through an array, it moves the pointer to
> the beginning of the array. You don’t need to reset an array before
> walking through it with foreach.'*
> *
> *
> *Does this mean - *
> *1) Before I navigate the array, foreach will bring the pointer to the
> starting key?*
> *2) After the first index, it goes to 2nd, 3rd, and nth? *
>
>
> Regards,
> Shreyas
>
Number 1.
Adam
--
Nephtali: PHP web framework that functions beautifully
http://nephtaliproject.com