note 40618 added to function.strripos
| From: | ebypdxatcomcastdotnet at rn2 dot php dot net | Date: | Tue, 09 Mar 2004 22:35:50 +0000 |
| Subject: | note 40618 added to function.strripos | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66514@lists.php.net to get a copy of this message | ||
I am running php 4.3.something... and it doesn't have this function nor does it know about
stripos. So I attempted to write them:
<?php
function strripos($haystack, $needle, $offset=0)
{
return (($p = stripos($haystack, $needle, $offset)) === false) ? false : max($p,
intval(strripos($haystack, $needle, $p+1)));
}
function stripos($haystack, $needle, $offset)
{
return strpos(strtolower($haystack), strtolower($needle), $offset);
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.strripos.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40618
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40618&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40618&report=yes
Search -- http://master.php.net/manage/user-notes.php