Skip to content

Instantly share code, notes, and snippets.

@withremote
withremote / gist:3034778
Created July 2, 2012 18:32
If String Contains
if(!function_exists('if_string_contains'))
{
function if_string_contains($needle,$haystack) {
if (is_array($needle)) {
$found_cout = 0;
foreach ($needle as $n) {
if (strlen(strstr($haystack,$n))>0) {
$found_cout++;
}