filmov
tv
20. PHP Array Functions-7 | array_key_exists , array_keys , array_map | ATIBlog

Показать описание
PHP Array functions part 7 [HINDI]
bool array_key_exists ( $key, $array );
array_keys ( $input [, $search_value [, $strict]] );
array array_map ( callback $callback, array $array1 [, array $array2...] );
1. array_key_exists()
This function is used to check for a key in a given array and returns true if present otherwise it returns false.
First parameter is the key , that will be checked.
Second parameter is the input array I which the key will be checked.
Returns boolean.
2. array_keys()
This function is used to check for the values and returns the resulting array of keys , where it finds the value.
First parameter is the input array.
Second parameter is the search value.
The third optional parameter is boolean(strict) to check for the values strictly or not.(== or ===)
3. array_map ()
This function is used to return an mapped array after applying the callback function to the first array.
First parameter is the callback function to be applied on the first array.
Second parameter is the input array.
Third, fourth, and so on, arrays are optional.
bool array_key_exists ( $key, $array );
array_keys ( $input [, $search_value [, $strict]] );
array array_map ( callback $callback, array $array1 [, array $array2...] );
1. array_key_exists()
This function is used to check for a key in a given array and returns true if present otherwise it returns false.
First parameter is the key , that will be checked.
Second parameter is the input array I which the key will be checked.
Returns boolean.
2. array_keys()
This function is used to check for the values and returns the resulting array of keys , where it finds the value.
First parameter is the input array.
Second parameter is the search value.
The third optional parameter is boolean(strict) to check for the values strictly or not.(== or ===)
3. array_map ()
This function is used to return an mapped array after applying the callback function to the first array.
First parameter is the callback function to be applied on the first array.
Second parameter is the input array.
Third, fourth, and so on, arrays are optional.