note 25150 added to function.strpos

From: Date: Thu, 12 Sep 2002 09:05:20 +0000
Subject: note 25150 added to function.strpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-36569@lists.php.net to get a copy of this message
Why don't you just do this ? -- if (($pos = strpos($haystack, $needle, $offset)) !== false) { // found } else { // not found } // end if -- Compact and easy ? -- http://www.php.net/manual/en/function.strpos.php http://master.php.net/manage/user-notes.php?action=edit+25150 http://master.php.net/manage/user-notes.php?action=delete+25150 http://master.php.net/manage/user-notes.php?action=reject+25150

« previous php.notes (#36569) next »