note 18036 added to function.strpos

From: Date: Tue, 08 Jan 2002 10:44:03 +0000
Subject: note 18036 added to function.strpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-24530@lists.php.net to get a copy of this message
if you want to check if a string includes some character, you may use code like this ('x' is in position 0 in the string so if $c is 'x' if structure will return false :) $c='5'; $s='01234567890'; if (strpos($s, 'x'.$c)) echo "$c is a number!"; -- http://www.php.net/manual/en/function.strpos.php http://master.php.net/manage/user-notes.php?action=edit+18036 http://master.php.net/manage/user-notes.php?action=delete+18036 http://master.php.net/manage/user-notes.php?action=reject+18036

« previous php.notes (#24530) next »