note 784 modified in strpos by ronabop
| From: | ronabop@php.net | Date: | Wed, 13 Dec 2000 06:23:05 +0000 |
| Subject: | note 784 modified in strpos by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8686@lists.php.net to get a copy of this message | ||
I resolved the problem by adding an underscore "_" to the variable and then testing for
"needle". Of course, if you're looking for an underscore, you've got a problem!
$newhaystack = "_".$haystack;
if (strpos($newhaystack, $needle)) { ... }
http://www.php.net/manual/function.strpos.php