$languages = [ 'JAVA', 'PHP', 'C++', 'C#', 'Python', ]; $totalElements = count($languages); echo $languages[$totalElements - 1];