Use a regular expression to do a case-insensitive search for "w3schools" in a string:
<?php
$str = "Visit W3Schools";
$pattern = "/w3schools/i";
echo preg_match($pattern, $str);
?>
by გიორგი ბაკაშვილი
4 years ago
PHP
RegEx
PHP official doc
2
Pro tip: use ```triple backticks around text``` to write in code fences