Return to Snippet

Revision: 5435
at March 9, 2008 01:24 by gbot


Initial Code
// php has no "in_string" function, so here's one...
		
function in_string($needle, $haystack, $insensitive = 0) {
if ($insensitive) {
		return (false !== stristr($haystack, $needle)) ? true : false;
	} else {
		return (false !== strpos($haystack, $needle))  ? true : false;
	}
}

Initial URL


Initial Description


Initial Title
Php string in string function

Initial Tags
search

Initial Language
PHP