一:bool in_array ( mixed $needle , array $haystack [, bool $strict ] )   

用的时候加最后一个参数,判断类型

<?php
$a = array('1.10', 12.4, 1.13);
if (in_array('12.4', $a, true)) {
echo "'12.4' found with strict check\n";
}
if (in_array(1.13, $a, true)) {
echo "1.13 found with strict check\n";
}
?>
上例将输出:
1.13 found with strict check

相关文章:

  • 2021-09-20
  • 2022-02-21
  • 2021-08-23
  • 2021-08-01
  • 2022-12-23
  • 2021-08-11
猜你喜欢
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2021-08-13
  • 2021-10-09
  • 2021-11-21
相关资源
相似解决方案