note 10858 deleted from function.strrpos by didou

From: Date: Sun, 10 Aug 2003 03:10:59 +0000
Subject: note 10858 deleted from function.strrpos by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53798@lists.php.net to get a copy of this message
Note Submitter: bkloppt@gmx.de ---- [Editor's Note] use if(strpos($str_test, 'a') !== false) { this will check if the TYPE is also a boolean. [/Note] Try this out: //-start $str_test = 'abc'; if (strpos($str_test,'a') != false) { [...do something..] } //-end This condition is false, because strpos returns a 0 for the position of the charater "a". But I supposed strpos will return no "false", because "a" is in the string... But in php false and 0 got the same meening, right?! As a php and programming newbee, I was really confused.

« previous php.notes (#53798) next »