Check if key array is exist with function array_key_exists
Syntax
Syntax
array_key_exists() returns
<?php
$search_array = array('first' => null, 'second' => 4);
// returns falseisset($search_array['first']);
// returns truearray_key_exists('first', $search_array);?>
TRUE
if the given key
is set in the array. key
can be any value possible for an array index.<?php
$search_array = array('first' => null, 'second' => 4);
// returns falseisset($search_array['first']);
// returns truearray_key_exists('first', $search_array);?>
0 comments:
Post a Comment
Please leave a comment