Do you know how to get the last element of an array?
Last element of an array -
$x = $array[sizeof($array) - 1];
Thank you very much. It works fine