Get the First Element of an Array in PHP

Simplest way to get first element of an array:

array_values($array)[0];

More information:

PHP: array_values – Manual

More Related Posts