select last element in array php code example Example: php last item of array echo end(['Gon', 'Killua', 'Hisoka']) // print Hisoka