Jason,

You can use array_pop() to return the last element of the array -

$last_item = array_pop ($array);

but if you just want your array processing to stop when it's reached the 
last item in the array (and avoid the loop) then do something like:

while (list ($var1, $var2) = each ($array))

HTH!

Best regards,
Andrew
--------------------------------------------
Andrew Hill - OpenLink Software
Directory of Technology Evangelism
Internet Data Integration Technology
http://www.openlinksw.com

On Thursday, April 19, 2001, at 07:57 PM, Jason Caldwell wrote:

> Is there a command which will tell me that it is the last in an array?
>
> When I use END it just gives me the value IN the array... I want to know
> when I hit the last element in an array...
>
> This is driving me crazy...
>
> Thanks.
> Jason
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to