a::first($array)

Returns the first element of an array

  • $array (array)
    The source array
  • return (mixed)
    The first element

Example

<?php
$array = array(
  'cat',
  'dog',
  'bird',
);
$first = a::first($array);
var_dump($first);

Result:

'cat'

Is something missing or incorrect? Edit this page on Github…