note 18036 deleted from function.strpos by nlopess
| From: | nlopess@php.net | Date: | Tue, 25 Jul 2006 11:20:33 +0000 |
| Subject: | note 18036 deleted from function.strpos by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-115142@lists.php.net to get a copy of this message | ||
Note Submitter: nmmm at nmmm dot nu
----
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!";