array_keys
array_keys — Return all the keys or a subset of the keys of an array.Description
array_keys( array $array, ): array
Description
array_keys( array $array,array_keys() returns the keys, numeric and string, from the array.
mixed $search_value,
bool $strict = false ): array
If a search_value is specified, then only the keys for that value are returned. Otherwise, all the keys from the array are returned.
Parameters
Parameters
array
An array containing keys to return.
search_value
If specified, then only keys containing these values are returned.
strict
Determines if strict comparison (===) should be used during the search.
Return Values
Returns an array of all the keys in array.More information about array_keys on official PHP documentation site
array_keys - Popular snippets
- PHP 8.0 / MySQL 5.7 mt_rand strtotime array_map date array_column max array_keys
last run:
2023-10-31 14:44:52
18
- PHP 7.4 / MySQL 8.0 mysqli_query mysqli_fetch_assoc explode count array_push trim array_count_values array_keys print_r
last run:
2023-06-06 16:46:02
15
- PHP 7.4 / MySQL 5.7 array_keys var_dump array_rand
last run:
2023-01-02 14:10:36
12
- PHP 8.1 / MySQL 5.7 array_combine array_values array_map array_keys strtolower print_r
last run:
2022-07-20 14:20:04
12
- PHP 7.4 / MySQL 5.7 array_keys var_dump array_rand
last run:
2023-01-02 14:15:01
11
- PHP 8.1 / MySQL 8.0 array_map array_keys implode
last run:
2024-02-29 08:39:08
9
- PHP 7.4 / MySQL 5.7 array_count_values array_keys array_filter print_r
last run:
2023-03-17 08:49:11
9
- PHP 8.0 / MySQL 5.7 array_map explode array_shift implode array_keys array_combine array_values var_export
last run:
2023-07-25 23:19:25
9
- PHP 8.0 / MySQL 5.7 mt_rand strtotime array_map date array_column max array_keys
last run:
2021-11-11 15:27:34
9
- PHP 8.0 / MySQL 5.7 array_filter array_keys is_numeric print_r
last run:
2022-02-21 10:31:17
8
array_keys - New snippets
-
PHP 8.2.13 / MariaDB 11.5 array_keys
added at:
2024-12-03 11:54:14
1
-
PHP 8.2.13 / MariaDB 11.5 print_r array_keys
added at:
2024-12-03 11:53:50
1
-
PHP 8.2.13 / MySQL 8.0 array_keys array_keys
added at:
2024-12-03 11:44:17
1
-
PHP 8.2.13 / MariaDB 11.4 array_keys strlen
added at:
2024-12-03 11:44:05
1
-
PHP 8.2.13 / MariaDB 11.4 array_keys strlen max str_repeat str_pad
added at:
2024-12-03 11:34:54
1
-
PHP 8.2.13 / MariaDB 11.4 array_keys strlen max
added at:
2024-12-03 11:29:42
1
-
PHP 8.2.13 / MariaDB 11.4 array_keys strlen
added at:
2024-12-03 11:29:17
1
-
PHP 8.2.13 / MariaDB 11.4 array_keys strlen
added at:
2024-12-03 10:55:53
1
-
PHP 8.2.13 / MariaDB 11.4 is_array array_keys
added at:
2024-12-03 10:49:20
1