note 45645 deleted from function.strpos by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 16:43:25 +0000 |
| Subject: | note 45645 deleted from function.strpos by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-154884@lists.php.net to get a copy of this message | ||
Note Submitter: ygrange at science dt uva dt nl
----
Hmm. I think the maker of multi_strpos forgot to add that it allowed a negative position (if $n=0,
$position[($n-1)] = $position[-1]. I just changed a slightly bit of the code to make it really
correct.
I just replace
$position[$n] = (strlen($fragment[0]) + $position[($n-1)]);
by
$position[$n] = (strlen($fragment[0]) + $positione[$n]);
$positione[$n+1]=$position[$n];