Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 15: | Line 15: | ||
* http://www.php.net/manual/en/function.stristr.php |
* http://www.php.net/manual/en/function.stristr.php |
||
+ | <pre> |
||
− | <highlightSyntax> |
||
<?php |
<?php |
||
$email = 'USER@EXAMPLE.com'; |
$email = 'USER@EXAMPLE.com'; |
||
Line 21: | Line 21: | ||
// outputs ER@EXAMPLE.com |
// outputs ER@EXAMPLE.com |
||
?> |
?> |
||
+ | </pre> |
||
− | </highlightSyntax> |
||
Example 2. Testing if a string is found or not |
Example 2. Testing if a string is found or not |
||
+ | <pre> |
||
− | <highlightSyntax> |
||
<?php |
<?php |
||
$string = 'Hello World!'; |
$string = 'Hello World!'; |
||
Line 32: | Line 32: | ||
// outputs: "earth" not found in string |
// outputs: "earth" not found in string |
||
?> |
?> |
||
+ | </pre> |
||
− | </highlightSyntax> |
||
Example 3. Using a non "string" needle |
Example 3. Using a non "string" needle |
||
+ | <pre> |
||
− | <highlightSyntax> |
||
<?php |
<?php |
||
$string = 'APPLE'; |
$string = 'APPLE'; |
||
Line 40: | Line 40: | ||
// outputs: APPLE |
// outputs: APPLE |
||
?> |
?> |
||
+ | </pre> |
||
− | </highlightSyntax> |
||
[[Category:PHP]] |
[[Category:PHP]] |