PHP strstr() function


In this article, We will explain to you PHP strstr() function with example.

PHP strstr() function

The strstr() function is a string function and case-sensitive. which is used to searches for the first case-sensitive occurrence of a string inside another string. so you can see our PHP String Function example.

Syntax

strstr(string,search,before_search);

Example

<?PHP
   echo strstr("This is my website","website");
?>

Output

website