note 78556 deleted from function.strrpos by googleguy

From: Date: Tue, 22 Oct 2013 08:00:46 +0000
Subject: note 78556 deleted from function.strrpos by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-196720@lists.php.net to get a copy of this message
Note Submitter: t dot hornberger at yatego dot com ---- the function posted is false, hier the correction: function rstrpos ($haystack, $needle, $offset) { $size = strlen ($haystack); $pos = strpos (strrev($haystack), strrev($needle), $size - $offset); if ($pos === false) return false; return $size - $pos - strlen($needle); }

« previous php.notes (#196720) next »