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.1 / MySQL 5.7 implode array_map array_keys
added at:
2024-11-12 03:52:44
1
-
PHP 8.1 / MySQL 5.7 array_keys implode array_map array_filter print_r
added at:
2024-11-12 03:42:21
1
-
PHP 8.1 / MySQL 5.7 array_keys implode array_map array_filter print_r
added at:
2024-11-12 03:42:07
1
-
PHP 8.1 / MySQL 5.7 array_keys implode array_map array_filter print_r
added at:
2024-11-12 03:41:52
1
-
PHP 8.1 / MySQL 5.7 implode array_map array_keys array_filter print_r
added at:
2024-11-12 03:21:39
1
-
PHP 8.1 / MySQL 5.7 implode array_map array_keys array_filter print_r
added at:
2024-11-12 03:20:07
1
-
PHP 8.1 / MySQL 5.7 implode array_map array_keys array_filter print_r
added at:
2024-11-12 03:19:36
1
-
PHP 8.1 / MySQL 5.7 array_keys print_r
added at:
2024-11-05 14:07:59
1
-
PHP 8.1 / MySQL 5.7 array_keys reset print_r
added at:
2024-11-05 14:07:39
1
-
PHP 8.1 / MySQL 5.7 array_keys reset print_r
added at:
2024-11-05 14:07:21
1