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" <[EMAIL PROTECTED]>
To: "Uma Shankari T." <[EMAIL PROTECTED]>
Cc: "PHP" <[EMAIL PROTECTED]>
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php