Re: Function in php
| From: | Becoming Digital | Date: | Wed, 24 Sep 2003 06:40:58 +0000 |
| Subject: | Re: Function in php | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163695@lists.php.net to get a copy of this message | ||
You could also get lazy and just use @strpos(). Tom's way is (obviously) better,
Edward Dudlik
Becoming Digital
www.becomingdigital.com
----- Original Message -----
From: "Tom Rogers" <trogers@kwikin.com>
To: "Uma Shankari T." <umashankari@lantana.tenet.res.in>
Cc: "PHP" <php-general@lists.php.net>
Sent: Wednesday, 24 September, 2003 01:48
Subject: Re: [PHP] Function in php
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php