Andrey, you are incorrect.

>From the manual on strpos():
int strpos (string haystack, string needle [, int offset])
If needle is not found, returns FALSE. 

-----Original Message-----
From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 7:47 AM
To: Rick Emery
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] comparisons



> if (ereg("john",$jeff) ) { }
> 
ok
> or:
> 
> if( strstr( $jeff, "john") ) { }
> 
ok
> or:
> 
> if( strpos( $jeff, "john") ) { }
error

if  (strpos($jeff, "john") !== FALSE)

Best regards,
Andrey Hristov


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to