How can I get the last element of an array without changing its internal pointer?
What i'm doing is:
while(list($key, $value) = each($array)) {
//do stuff
if($condition) {
//Here I want to check if this is the last element of the array
prev($array);
}
}
so end($array)
would mess things up.