Possible Duplicate:
PHP get index of last inserted item in array
I have an array or variable length and would like a quick and easy way to know the value of the last item in the array (without actually removing it from the array). How can I pop the last item off the array without actually removing it from the array?