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