note 98738 rejected from function.array-search by danbrown
| From: | danbrown@php.net | Date: | Sat, 03 Jul 2010 18:03:19 +0000 |
| Subject: | note 98738 rejected from function.array-search by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-170686@lists.php.net to get a copy of this message | ||
Note Submitter: netademonnet at abv dot bg
----
$valueArray =array(0,'peter');
$pos=array_search( 'peter', $valueArray );
echo $pos; // gives 0
$valueArray =array('sam',0,'peter');
$pos=array_search( 'peter', $valueArray );
echo $pos; // gives 1
or array_search stops at the position of the 0, or i'm doing something wrong!
10x