String find Demo : String Find « String « PHP






String find Demo


<?
$string_to_search = "showsuponceshowsuptwice";
$string_to_find = "up";

print("Result of looking for $string_to_find" . strstr($string_to_search, $string_to_find));

$string_to_find = "down";

print("Result of looking for $string_to_find" . strstr($string_to_search, $string_to_find));
?>
           
       








Related examples in the same category

1.Finding a Substring Within a String with strstr()