public function add($key, $val) {
        if (!isset($this->_attrs[$key])) {
            $this->_attrs[$key] = [];
        }
        
        if (!strcasecmp($key, 'id')) {
            // value for `id` should be one only
            $this->_attrs[$key] = $val;
        } else {
            // else append it
            array_push($this->_attrs[$key], $val);
        }
        
        return $this;
    }
public function add($key, $val) {
        if (!isset($this->_attrs[$key])) {
            $this->_attrs[$key] = [];
        }
        
        if (!strcasecmp($key, 'id')) {
            // value for `id` should be one only
            $this->_attrs[$key] = $val;
        } else {
            // else append it
            array_push($this->_attrs[$key], $val);
        }
        
        return $this;
    }
public function add ( $ key , $ val ) { if ( ! isset ( $ this -> _attrs [ $ key ] ) ) { $ this -> _attrs [ $ key ] = [ ] ; } if ( ! strcasecmp ( $ key , 'id' ) ) { // value for `id` should be one only $ this -> _attrs [ $ key ] = $ val ; } else { // else append it array_push ( $ this -> _attrs [ $ key ] , $ val ) ; } return $ this ; }
Add attribute to tag

@access  public
@param   string  $key    Attribute
@param   string  $val    Attribute value
@return  object  Tag instance
Add attribute to tag