这是数组,如下所示:
$array = ['blog.setting', 'blog.post', 'blog.delete', 'blog.edit', 'other.other'];
I want to know if there is element which has 'blog.'
;
Maybe like this will be perfect.
in_array('blog.*', $array)
谁能帮我?
这是数组,如下所示:
$array = ['blog.setting', 'blog.post', 'blog.delete', 'blog.edit', 'other.other'];
I want to know if there is element which has 'blog.'
;
Maybe like this will be perfect.
in_array('blog.*', $array)
谁能帮我?
U need to use regular expression, and
array_filter
method