RE: [PHP] comparisons

From: Date: Fri, 22 Mar 2002 13:58:33 +0000
Subject: RE: [PHP] comparisons
Groups: php.general 
Request: Send a blank email to php-general+get-89680@lists.php.net to get a copy of this message
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:ahristov@icygen.com] Sent: Friday, March 22, 2002 7:47 AM To: Rick Emery Cc: php-general@lists.php.net 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

« previous php.general (#89680) next »