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