Re: [PHP] end of array

2005-01-22 Thread Jeffery Fernandez
Rasmus Lerdorf wrote: Jeffery Fernandez wrote: Hi all, I have a foreach loop on an array and within that loop I need to find if the array has reached the last pointer. I have tried if (next($row)) { } but that advances the pointer. Any tips on finding out if the array pointer has reached the las

Re: [PHP] end of array

2005-01-22 Thread Rasmus Lerdorf
Jeffery Fernandez wrote: Hi all, I have a foreach loop on an array and within that loop I need to find if the array has reached the last pointer. I have tried if (next($row)) { } but that advances the pointer. Any tips on finding out if the array pointer has reached the last element ? end($arr);

[PHP] end of array

2005-01-22 Thread Jeffery Fernandez
Hi all, I have a foreach loop on an array and within that loop I need to find if the array has reached the last pointer. I have tried if (next($row)) { } but that advances the pointer. Any tips on finding out if the array pointer has reached the last element ? cheers, Jeffery -- PHP General Mai