是否有机会在preg_grep输入中搜索不区分大小写的搜索?preg_grep搜索不区分大小写
$checkAuth = preg_grep("/CN=".$cn_name."/", $entries[0]["member"]);
cn_name可以是大写和小写形式,但只适用于区分大小写的正确名称。我知道,可的preg_match与被用在“我”,如:
preg_match("/php/i", "PHP is the web scripting language of choice.")
,但需要的preg_match一个字符串,而不是一个阵列工作。
为什么你就不能添加'i'标志'preg_grep'? – elclanrs
可能的重复[我如何使此preg \ _match区分大小写?](http://stackoverflow.com/questions/12411037/how-do-i-make-this-preg-match-case-insensitive) – MortalViews
可能请阅读preg_grep – mnlfischer