Skip to content

Instantly share code, notes, and snippets.

@RobKohr
Created May 11, 2011 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobKohr/967441 to your computer and use it in GitHub Desktop.
Save RobKohr/967441 to your computer and use it in GitHub Desktop.
is_substr().php
/*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