stristr Function in PHP

What is stristr Function and how it is used in string?


In PHP,this function searchs for the first occurence of a string inside another string.



In the above syntax "string" specifies the string to search, "search" specifies the string to search for.

Example :

echo stristr("Hi,my name is Sam Anderson.",n);
Result :

name is Sam Anderson

In the above example the string is displayed from the first occurence of the letter "n".

PHP Topics

Ask Questions

Ask Question