public function filter($content, $search, $type)
    {
        $items = !empty($content) ? unserialize($content) : [];
        switch ($type) {
            case 'in':
                foreach ($items as $item) {
                    if (strpos($item, $search) !== false) {
                        return true;
                    }
                }
                return false;
                break;
            default:
                return in_array($search, $items);
        }
    }
public function filter($content, $search, $type)
    {
        $items = !empty($content) ? unserialize($content) : [];
        switch ($type) {
            case 'in':
                foreach ($items as $item) {
                    if (strpos($item, $search) !== false) {
                        return true;
                    }
                }
                return false;
                break;
            default:
                return in_array($search, $items);
        }
    }
public function filter ( $ content , $ search , $ type ) { $ items = ! empty ( $ content ) ? unserialize ( $ content ) : [ ] ; switch ( $ type ) { case 'in' : foreach ( $ items as $ item ) { if ( strpos ( $ item , $ search ) !== false ) { return true ; } } return false ; break ; default : return in_array ( $ search , $ items ) ; } }
Filter in now an array search
@param string $content
@param string $search
@param string $type
@return bool
Filter in now an array search