note 104255 deleted from function.strpos by danbrown
| From: | danbrown@php.net | Date: | Fri, 03 Jun 2011 19:46:02 +0000 |
| Subject: | note 104255 deleted from function.strpos by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180240@lists.php.net to get a copy of this message | ||
Note Submitter: Jan
----
@akarmenia, your version is not returning the first occurrence of any of the needles, but only the
first occurence of the first found needle!
try:
<?php echo strpos_array('That is a test', array('a', 'is')); ?>
Output will be 8 (for the 'a'), but I expect 5 (for 'is').