How to stristr function work?

 Published April 23,2010 in PHP

string stristr ( string haystack, string needle )
 

Returns all of haystack from the first occurrence of needle to the end. needle and haystack are examined in a case-insensitive manner.

 

If needle is not found, returns FALSE.

 

If needle is not a string, it is converted to an integer and applied as the ordinal value of a character.

Example 1. stristr() example

$email = 'USER@EXAMPLE.com'; $domain = stristr($email, 'e'); echo $domain; // outputs ER@EXAMPLE.com

 

 

Note: This function is binary-safe.



Like our site? Be a member of Coolajax fan page to get daily posts updates!

recommended-tutorial You May Like This Posts!

» Classified Made Easy

» How to strtok function works?

» Displaying Information and Variables

» 4 life savings php array function for web developers

» How to strpos function works?

  tuts_view Total Read: 551
blog comments powered by Disqus

Topics

Coolajax Fans

coolajax fan page on Facebook