function _getHeaderLine() {
        // Make sure column count is correct
        for ($j = 0; $j < count($this->_headers); $j++) {
            for ($i = 0; $i < $this->_max_cols; $i++) {
                if (!isset($this->_headers[$j][$i])) {
                    $this->_headers[$j][$i] = '';
                }
            }
        }

        for ($j = 0; $j < count($this->_headers); $j++) {
            for ($i = 0; $i < count($this->_headers[$j]); $i++) {
                if ($this->_strlen($this->_headers[$j][$i]) <
                    $this->_cell_lengths[$i]
                ) {
                    $this->_headers[$j][$i] =
                        $this->_strpad($this->_headers[$j][$i],
                            $this->_cell_lengths[$i],
                            ' ',
                            $this->_col_align[$i]);
                }
            }
        }

        $vertical = $this->_border['vertical'];
        $row_begin = $this->_borderVisibility['left']
            ? $vertical . str_repeat(' ', $this->_padding)
            : '';
        $row_end = $this->_borderVisibility['right']
            ? str_repeat(' ', $this->_padding) . $vertical
            : '';
        $implode_char = str_repeat(' ', $this->_padding) . $vertical
            . str_repeat(' ', $this->_padding);

        $separator = $this->_getSeparator();
        if (!empty($separator) && $this->_borderVisibility['top']) {
            $return[] = $separator;
        }
        for ($j = 0; $j < count($this->_headers); $j++) {
            $return[] = $row_begin
                . implode($implode_char, $this->_headers[$j]) . $row_end;
        }

        return implode(PHP_EOL, $return);
    }
function _getHeaderLine() {
        // Make sure column count is correct
        for ($j = 0; $j < count($this->_headers); $j++) {
            for ($i = 0; $i < $this->_max_cols; $i++) {
                if (!isset($this->_headers[$j][$i])) {
                    $this->_headers[$j][$i] = '';
                }
            }
        }

        for ($j = 0; $j < count($this->_headers); $j++) {
            for ($i = 0; $i < count($this->_headers[$j]); $i++) {
                if ($this->_strlen($this->_headers[$j][$i]) <
                    $this->_cell_lengths[$i]
                ) {
                    $this->_headers[$j][$i] =
                        $this->_strpad($this->_headers[$j][$i],
                            $this->_cell_lengths[$i],
                            ' ',
                            $this->_col_align[$i]);
                }
            }
        }

        $vertical = $this->_border['vertical'];
        $row_begin = $this->_borderVisibility['left']
            ? $vertical . str_repeat(' ', $this->_padding)
            : '';
        $row_end = $this->_borderVisibility['right']
            ? str_repeat(' ', $this->_padding) . $vertical
            : '';
        $implode_char = str_repeat(' ', $this->_padding) . $vertical
            . str_repeat(' ', $this->_padding);

        $separator = $this->_getSeparator();
        if (!empty($separator) && $this->_borderVisibility['top']) {
            $return[] = $separator;
        }
        for ($j = 0; $j < count($this->_headers); $j++) {
            $return[] = $row_begin
                . implode($implode_char, $this->_headers[$j]) . $row_end;
        }

        return implode(PHP_EOL, $return);
    }
function _getHeaderLine ( ) { // Make sure column count is correct for ( $ j = 0 ; $ j < count ( $ this -> _headers ) ; $ j ++ ) { for ( $ i = 0 ; $ i < $ this -> _max_cols ; $ i ++ ) { if ( ! isset ( $ this -> _headers [ $ j ] [ $ i ] ) ) { $ this -> _headers [ $ j ] [ $ i ] = '' ; } } } for ( $ j = 0 ; $ j < count ( $ this -> _headers ) ; $ j ++ ) { for ( $ i = 0 ; $ i < count ( $ this -> _headers [ $ j ] ) ; $ i ++ ) { if ( $ this -> _strlen ( $ this -> _headers [ $ j ] [ $ i ] ) < $ this -> _cell_lengths [ $ i ] ) { $ this -> _headers [ $ j ] [ $ i ] = $ this -> _strpad ( $ this -> _headers [ $ j ] [ $ i ] , $ this -> _cell_lengths [ $ i ] , ' ' , $ this -> _col_align [ $ i ] ) ; } } } $ vertical = $ this -> _border [ 'vertical' ] ; $ row_begin = $ this -> _borderVisibility [ 'left' ] ? $ vertical . str_repeat ( ' ' , $ this -> _padding ) : '' ; $ row_end = $ this -> _borderVisibility [ 'right' ] ? str_repeat ( ' ' , $ this -> _padding ) . $ vertical : '' ; $ implode_char = str_repeat ( ' ' , $ this -> _padding ) . $ vertical . str_repeat ( ' ' , $ this -> _padding ) ; $ separator = $ this -> _getSeparator ( ) ; if ( ! empty ( $ separator ) && $ this -> _borderVisibility [ 'top' ] ) { $ return [ ] = $ separator ; } for ( $ j = 0 ; $ j < count ( $ this -> _headers ) ; $ j ++ ) { $ return [ ] = $ row_begin . implode ( $ implode_char , $ this -> _headers [ $ j ] ) . $ row_end ; } return implode ( PHP_EOL , $ return ) ; }
Returns the header line for the table.

@return string  The header line of the table.
Returns the header line for the table .