The First Array Element in PHP
The first element of an array has an index 0.
To get it, you should access it
by this index. See the example:
<?php
$arr = ['a', 'b', 'c'];
echo $arr[0];
?>
Code execution result:
1
You can also use the array_shift function.
See the example:
<?php
$arr = ['a', 'b', 'c'];
echo array_shift($arr);
?>
Code execution result:
'a'