note 10858 added to strrpos

From: Date: Wed, 24 Jan 2001 10:20:11 +0000
Subject: note 10858 added to strrpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-10210@lists.php.net to get a copy of this message
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. http://www.php.net/manual/de/function.strrpos.php

« previous php.notes (#10210) next »