- stripos: documentation ( source)
<?php
$flavor = "Cookie Dough";
$search_term = "Cookie";
if (stripos($search_term,$flavor) !== false) {
echo "Randy's favorite flavor of ice cream contains the search term '" . $search_term . "'.";
} else {
echo "Randy's favorite flavor of ice cream does NOT contain the search term '" . $search_term . "'.";
}
?>