Created
March 19, 2019 15:19
-
-
Save versluis/fa5d47283804efca3c474ac487078eb0 to your computer and use it in GitHub Desktop.
helper function to test if a string is contained in another string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isThisInThat ($needle, $haystack) { | |
return strpos($haystack, $needle) !==false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
modified version of something I found here:
https://stackoverflow.com/questions/4366730/how-do-i-check-if-a-string-contains-a-specific-word