array_keys

PHP 4, PHP 5, PHP 7, PHP 8
array_keys - Return all the keys or a subset of the keys of an array

Example #1 array_keys example

Result: Array ( [0] => 0 [1] => color ) Array ( [0] => 0 [1] => 3 [2] => 4 ) Array ( [0] => color [1] => size )
PHP Version:


Example #2 of array_keys

PHP Version:


Function array_keys:

Arrays Functions

Most used PHP functions