note 31011 deleted from function.strpos by didou

From: Date: Sun, 10 Aug 2003 02:59:56 +0000
Subject: note 31011 deleted from function.strpos by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53786@lists.php.net to get a copy of this message
Note Submitter: daniel.phpnet@holomind.de ---- You could also try this, which is quite simple: if ( strpos( $str1, $str2 ) >-1 ) { #do something; } This should work, because 0 is greater -1, but the statement false is not greater -1 because of different types.

« previous php.notes (#53786) next »