sigil88
4/24/2018 - 2:27 PM

last element of array php

$lastEl = array_values(array_slice($array, -1))[0];