note 54218 deleted from function.strripos by victor

From: Date: Fri, 19 Aug 2005 08:28:50 +0000
Subject: note 54218 deleted from function.strripos by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-93876@lists.php.net to get a copy of this message
Note Submitter: kim ---- this function seems to disregard the "offset" variable. for instance, when i do the example above using the offset value, it's incorrect: <?php $haystack = 'this is a string with spaces.'; $needle = ' '; $pos = strripos($haystack, $needle, 13); if ($pos !== false) { echo "We found the last ($needle) in ($haystack) at position ($pos)"; } ?> it returns 21, but should return 9.

« previous php.notes (#93876) next »