note 71097 rejected from function.strpos by tularis
| From: | tularis@php.net | Date: | Sun, 12 Nov 2006 14:14:43 +0000 |
| Subject: | note 71097 rejected from function.strpos by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-119626@lists.php.net to get a copy of this message | ||
Note Submitter: star2105 at gmail dot com
----
when using this function, instead of being able to handele a 'not found' notion of the
function, the script stops (jumps out of function) and the next line is displayed in the browser:
Warning: strpos() [function.strpos]: Empty delimiter. in C:\wamp\www\test.php on line 21
code looks like this:
19 $subject = "abc";
20 $find = "f";
21 $pos = strpos($subject,$find);
22 if ($pos !== FALSE)
23 {
please advise