array_last
Gets the last value of an array
&reftitle.description;
mixedarray_last
arrayarray
Get the last value of the given array.
&reftitle.parameters;
array
An array.
&reftitle.returnvalues;
Returns the last value of array if the array is not empty;
&null; otherwise.
&reftitle.examples;
Basic array_last Usage
'a', 0 => 'b', 3 => 'c', 2 => 'd'];
$lastValue = array_last($array);
var_dump($lastValue);
?>
]]>
&example.outputs;
&reftitle.seealso;
array_key_last
array_first