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 (strpos($myString, $word) !== false) { echo "Word Found!"; } else { echo "Word Not Found!"; } ?>
Result:
Report an issue