Write a PHP script that checks whether a string contains another string
<?php $pattern = '/[^\w]fox\s/'; if (preg_match($pattern, 'The quick brown fox jumps over the lazy dog')) { echo "'fox' is present..."."\n"; } else echo "'fox' is not present..."."\n"; ?>
Sample Output:
'fox' is present...
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer