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

WBOY
Release: 2016-06-13 11:47:54
Original
1046 people have browsed it

怎样搜索数据中的一个字节
如例
$os = array ("Mac", "NT", "Irix我们是大大的好", "Linux");
if (array_search ("Irix", $os)) {
    print "数组中有Irix";
}
?>
------解决方案--------------------

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template