Re: Function in php
| From: | Tom Rogers | Date: | Wed, 24 Sep 2003 05:48:36 +0000 |
| Subject: | Re: Function in php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163690@lists.php.net to get a copy of this message | ||
Hi,
Wednesday, September 24, 2003, 3:27:48 PM, you wrote:
UST> Hello,
UST> I am using strpos function for finding the string position in a
UST> particular string . if the searching string is empty it is showing this
UST> warning error
UST> Warning: Empty delimiter in filename text.php on line 33
UST> is there any other way to avoid displaying this warning error..??
UST> Regards,
UST> Uma
Don't do a search with an empty token :)
$pos = false;
if(!empty($token)){
$pos = strpos($string,$token);
}
if($pos){
do whatever;
}
--
regards,
Tom