How to Get First Element of Array in PHP? July 20, 2023 by Pakainfo I will use array_shift() and array_values() function to get first element of array using php. so, let’s see the simple full Source code of it. Get First Element of Array in PHP Contents Toggle Get First Element of Array in PHPRelated posts index.php Output: string(3) "com" Related posts: php delete from array – Deleting an element from an array in PHP remove first element from array js – How to Remove First Element from Array in JQuery?