php的array_key_exists函数奇怪有关问题

WBOY
Release: 2016-06-13 10:52:04
Original
979 people have browsed it

php的array_key_exists函数奇怪问题

  $arrFinal = array(); 
  for($i=0;$i   {
if( array_key_exists('aa', $arrFinal) )
continue;

array_push( $arrFinal, array('aa' => 'bb') );  
  }

执行完后,会有5个结果,而不是1个结果, array_key_exists没有工作,求解释

------解决方案--------------------
好的 趁你还清醒快点结帖
------解决方案--------------------
楼上太腹黑了,故意发个回帖让楼主不能删帖回收可用分…………

给个建议,array_key_exists不如isset

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