protected function tagExists($tagName, array $tags)
    {
        foreach ($tags as $tag) {
            if ($tag['tag'] == $tagName) {
                if (array_key_exists('merge_id', $tag)) {
                    return $tag['merge_id'];
                }
                return true;
            }
        }
        return false;
    }
protected function tagExists($tagName, array $tags)
    {
        foreach ($tags as $tag) {
            if ($tag['tag'] == $tagName) {
                if (array_key_exists('merge_id', $tag)) {
                    return $tag['merge_id'];
                }
                return true;
            }
        }
        return false;
    }
protected function tagExists ( $ tagName , array $ tags ) { foreach ( $ tags as $ tag ) { if ( $ tag [ 'tag' ] == $ tagName ) { if ( array_key_exists ( 'merge_id' , $ tag ) ) { return $ tag [ 'merge_id' ] ; } return true ; } } return false ; }
Test if the merge field Tag exists in an array
@param string $tagName
@param array $tags
@return mixed (Boolean true|false) or $tag['merge_id']
Test if the merge field Tag exists in an array