An example is given below:

BY Best Interview Question ON 05 May 2020

Example

$mainString = "I am Bestinterviewquestion.com";
$searchedString = "am";

if( strpos( $mainString, $searchedString ) !== false) {
    echo "\"am\" exists in the main string";
}