get second to last item from array php code example Example: php get second last element of array $array = array(5,6,70,10,36,2); echo $array[count($array) -2];