Skip to content

Instantly share code, notes, and snippets.

@withremote
withremote / gist:3034778
Created Jul 2, 2012
If String Contains
View gist:3034778
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++;
}
You can’t perform that action at this time.