public function add($attr, $cont)
    {
        if (is_string($attr)) {
            $attr = array('class' => $attr);
        }

        $cell = new stdClass;
        $cell->attrib  = $attr;
        $cell->content = $cont;

        $this->rows[$this->rowindex]->cells[$this->colindex] = $cell;
        $this->colindex += max(1, intval($attr['colspan']));

        if ($this->attrib['cols'] && $this->colindex >= $this->attrib['cols']) {
            $this->add_row();
        }
    }