public function getHtmlPreview($numLines = 5)
    {
        $html = '<table>';
        if ($this->header) {
            $html .= '<thead><tr>';
            foreach ($this->header as $h) {
                $html .= '<th>' . htmlentities($h, ENT_QUOTES, 'UTF-8') . '</th>';
            }
            $html .= '</tr></thead>';
        }
        $html .= '<tbody>';
        $i = 0;
        foreach ($this as $line) {
            if ($i >= $numLines) {
                break;
            }
            $html .= '<tr>';
            foreach ($line as $v) {
                $html .= '<td>' . htmlentities($v, ENT_QUOTES, 'UTF-8') . '</td>';
            }
            $html .= '</tr>';
            $i++;
        }
        $html .= '</tbody></table>';

        return $html;
    }
public function getHtmlPreview($numLines = 5)
    {
        $html = '<table>';
        if ($this->header) {
            $html .= '<thead><tr>';
            foreach ($this->header as $h) {
                $html .= '<th>' . htmlentities($h, ENT_QUOTES, 'UTF-8') . '</th>';
            }
            $html .= '</tr></thead>';
        }
        $html .= '<tbody>';
        $i = 0;
        foreach ($this as $line) {
            if ($i >= $numLines) {
                break;
            }
            $html .= '<tr>';
            foreach ($line as $v) {
                $html .= '<td>' . htmlentities($v, ENT_QUOTES, 'UTF-8') . '</td>';
            }
            $html .= '</tr>';
            $i++;
        }
        $html .= '</tbody></table>';

        return $html;
    }
public function getHtmlPreview ( $ numLines = 5 ) { $ html = '<table>' ; if ( $ this -> header ) { $ html .= '<thead><tr>' ; foreach ( $ this -> header as $ h ) { $ html .= '<th>' . htmlentities ( $ h , ENT_QUOTES , 'UTF-8' ) . '</th>' ; } $ html .= '</tr></thead>' ; } $ html .= '<tbody>' ; $ i = 0 ; foreach ( $ this as $ line ) { if ( $ i >= $ numLines ) { break ; } $ html .= '<tr>' ; foreach ( $ line as $ v ) { $ html .= '<td>' . htmlentities ( $ v , ENT_QUOTES , 'UTF-8' ) . '</td>' ; } $ html .= '</tr>' ; $ i ++ ; } $ html .= '</tbody></table>' ; return $ html ; }
Returns an HTML table preview of the csv data

@return string
Returns an HTML table preview of the csv data