note 94849 deleted from function.in-array by danbrown

From: Date: Mon, 30 Nov 2009 13:07:27 +0000
Subject: note 94849 deleted from function.in-array by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-163414@lists.php.net to get a copy of this message
Note Submitter: blade39 at kolosstudio dot ru ---- Found strange things, for example create such array $arSortFields=array('id','title); and do such thing echo intval(in_array(0,$arSortFields)); You will get "1" in echo! Thats means that element 0 is in array! But if you do echo intval(in_array(0,array()); you will got 0 as expected. So be carefull to pass 0 as first parameter

« previous php.notes (#163414) next »