note 93565 added to function.strpos
| From: | juniordez at gmail dot com | Date: | Wed, 16 Sep 2009 16:43:40 +0000 |
| Subject: | note 93565 added to function.strpos | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160748@lists.php.net to get a copy of this message | ||
Function to get the string position before the pos passed:
function strposReverse( $str, $search, $pos ){
$str = strrev($str);
$search = strrev($search);
$pos = (strlen($str) - 1) - $pos;
$posRev = strpos( $str, $search, $pos );
return (strlen($str) - 1) - $posRev - (strlen($search) - 1);
}
----
Server IP: 187.16.23.128
Probable Submitter: 200.180.144.154
----
Manual Page -- http://www.php.net/manual/en/function.strpos.php
Edit -- https://master.php.net/note/edit/93565
Del: integrated -- https://master.php.net/note/delete/93565/integrated
Del: useless -- https://master.php.net/note/delete/93565/useless
Del: bad code -- https://master.php.net/note/delete/93565/bad+code
Del: spam -- https://master.php.net/note/delete/93565/spam
Del: non-english -- https://master.php.net/note/delete/93565/non-english
Del: in docs -- https://master.php.net/note/delete/93565/in+docs
Del: other reasons-- https://master.php.net/note/delete/93565
Reject -- https://master.php.net/note/reject/93565
Search -- https://master.php.net/manage/user-notes.php