note 68010 deleted from function.stripos by danbrown
| From: | danbrown@php.net | Date: | Wed, 29 Jun 2011 18:58:16 +0000 |
| Subject: | note 68010 deleted from function.stripos by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-181073@lists.php.net to get a copy of this message | ||
Note Submitter: michiel at mb-it dot nl
----
Since the stripos-function is PHP5-only, the function below could give PHP4-users the same
functionallity:
function stripos($string,$word)
{
$retval = false;
for($i=0;$i<=strlen($string);$i++)
{
if (strtolower(substr($string,$i,strlen($word))) == strtolower($word))
{
$retval = true;
}
}
return $retval;
}