note 26781 added to function.stristr
| From: | Techdeck at Techdeck dot org | Date: | Tue, 12 Nov 2002 18:26:34 +0000 |
| Subject: | note 26781 added to function.stristr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39408@lists.php.net to get a copy of this message | ||
An example for the stristr() function:
<?php
$a = "I like php";
if (stristr("$a", "LikE PhP")) {
print ("According to \$a, you like PHP.");
}
?>
It will look in $a for "like php" (NOT case sensetive. though, strstr() is
case-sensetive).
For the ones of you who uses linux.. It is similiar to the "grep" command.
Actually.. "grep -i".
--
http://www.php.net/manual/en/function.stristr.php
http://master.php.net/manage/user-notes.php?action=edit+26781
http://master.php.net/manage/user-notes.php?action=delete+26781
http://master.php.net/manage/user-notes.php?action=reject+26781