Source Code:
(back to article)
<?php $word = 'fox'; $myString = 'The quick brown fox jumps over the lazy dog'; // Test whether the string contains the word if (str_contains($myString, $word)) { echo 'Word Found!'; } else { echo 'Word Not Found!'; }
Result:
Report an issue