Re: [PHP] Question - foreach.

2010-06-11 Thread tedd
At 3:46 PM -0400 6/10/10, Paul M Foster wrote: On Thu, Jun 10, 2010 at 11:16:08AM -0400, tedd wrote: I spend much of my time thinking Did I do that before? grin I know the feeling. I will say this, though. I have yet to figure out, from your URLs, how your site(s) is/are organized. Maybe a

Re: [PHP] Question - foreach.

2010-06-10 Thread tedd
At 7:19 AM +0530 6/10/10, Shreyas 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.'* *

Re: [PHP] Question - foreach.

2010-06-10 Thread Paul M Foster
On Thu, Jun 10, 2010 at 07:03:28AM -0400, tedd wrote: At 7:19 AM +0530 6/10/10, Shreyas 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

Re: [PHP] Question - foreach.

2010-06-10 Thread Shreyas
All, I tried and tested it but wanted a solid confirmation on it. I felt foreach usage is better than manual way of next(), prev() et al. Thanks for the comments. I consider the thread answered and solved unless someone has anything more to add. Regards, Shreyas On Thu, Jun 10, 2010 at 7:02

Re: [PHP] Question - foreach.

2010-06-10 Thread tedd
At 9:32 AM -0400 6/10/10, Paul M Foster wrote: On Thu, Jun 10, 2010 at 07:03:28AM -0400, tedd wrote: This is one of those questions that you can test very easily, just initialize an array and try it. +1 This is Tedd's modus operandi. His website(s) are full of exactly this type of thing.

Re: [PHP] Question - foreach.

2010-06-10 Thread Paul M Foster
On Thu, Jun 10, 2010 at 11:16:08AM -0400, tedd wrote: At 9:32 AM -0400 6/10/10, Paul M Foster wrote: On Thu, Jun 10, 2010 at 07:03:28AM -0400, tedd wrote: This is one of those questions that you can test very easily, just initialize an array and try it. +1 This is Tedd's modus

RE: [PHP] Question - foreach.

2010-06-10 Thread Bob McConnell
From: Paul M Foster On Thu, Jun 10, 2010 at 11:16:08AM -0400, tedd wrote: At 9:32 AM -0400 6/10/10, Paul M Foster wrote: On Thu, Jun 10, 2010 at 07:03:28AM -0400, tedd wrote: Paul: Now, if I could get the old memory to lock in and remember it, it would be great! I spend much of my

Re: [PHP] Question - foreach.

2010-06-10 Thread David McGlone
On Thursday 10 June 2010 11:16:08 tedd wrote: At 9:32 AM -0400 6/10/10, Paul M Foster wrote: On Thu, Jun 10, 2010 at 07:03:28AM -0400, tedd wrote: This is one of those questions that you can test very easily, just initialize an array and try it. +1 This is Tedd's modus operandi.

Re: [PHP] Question - foreach.

2010-06-09 Thread Adam Richardson
On Wed, Jun 9, 2010 at 9:49 PM, Shreyas shreya...@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

Re: [PHP] Question - foreach.

2010-06-09 Thread Jim Lucas
Shreyas 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)

Re: [PHP] Question - foreach.

2010-06-09 Thread Daniel Brown
On Wed, Jun 9, 2010 at 21:49, Shreyas shreya...@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