php的in_array的用法php

/ / 2019-07-11   阅读:2558
<?php $people = array("Peter", "Joe", "Glenn", "Cleveland"); if (in_array("Glenn",$people))   {   echo "找到了";   } else   {   echo "没找到";   } ?> ...
<?php
$people = array("Peter", "Joe", "Glenn", "Cleveland");

if (in_array("Glenn",$people))
  {
  echo "找到了";
  }
else
  {
  echo "没找到";
  }
?>

输出:
找到了

我要评论

昵称:
验证码:

最新评论

共0条 共0页 10条/页 首页 上一页 下一页 尾页
意见反馈