Is it possible to use a regular expression with the php function array_key_exists()
?
For example:
$exp = "my regex";
array_key_exists($exp, $array);
Thank you!
You can extract the array keys using array_keys() and then use preg_grep() on that array:
.
Output:
|
|||||||
|
No, I'm afraid not. You can iterate the array keys and perform matches on those:
|
|||||||
|