Home >Backend Development >PHP Tutorial >怎样搜索数据中的一个字节

怎样搜索数据中的一个字节

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:24:12999browse

如例
$os = array ("Mac", "NT", "Irix我们是大大的好", "Linux");
if (array_search ("Irix", $os)) {
    print "数组中有Irix";
}
?>


回复讨论(解决方案)

敢问你说的是不是全文搜索。

敢问你说的是不是全文搜索。 是全文搜索

$os = array ("Mac", "NT", "Irix我们是大大的好", "Linux");if (preg_grep("/Irix/", $os)) {    print "数组中有Irix";}

我也学到了。。继续

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn