Created
May 11, 2011 21:42
-
-
Save RobKohr/967441 to your computer and use it in GitHub Desktop.
is_substr().php
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
/*return true if needle (string) is in haystack (string)*/ | |
function is_substr($needle, $haystack){ | |
$pos = strpos($haystack, $needle); | |
if ($pos === false) { | |
return false; | |
} else { | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment