diff --git a/README.md b/README.md index 1763ead..2743e6d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ For this PHP code exercise, create a file named `string_search.php`. This file s If *needle* is not found in *haystack*, `string_search()` should return `false`. If *needle* is found in *haystack*, `string_search()` should return string formatted as `Found 'needle' at index x` where `needle` is the first parameter and `x` is the starting index where `needle` was found. -For example, if *needle* were `search` and *haystack* were `string search`, `string_search()` should return `Found 'search' at position 7`. +For example, if *needle* were `search` and *haystack* were `string search`, `string_search()` should return `Found 'search' at index 7`. There are a few special cases: diff --git a/src/string_search.php b/src/string_search.php new file mode 100644 index 0000000..1cfed4c --- /dev/null +++ b/src/string_search.php @@ -0,0 +1,34 @@ + \ No newline at end of file