public function draw($data) {
        
        // if the data is sane, and the widths have been set (if not calculate them)
        if ($this->dataCheck($data)) {
            
            // calculate the widths
            $this->calculateWidths($data);
            
            // if at least one of the columns has header text
            if ($this->hasHeader()) {
                
                // bold and underscore for the title
                $style = new Style();
                $style->setBold()->setUnderscore();

                $headers = $this->getHeaderText();
                
                // draw the row of cells
                $this->drawRow($headers, $style);       
                
            }
            
            // go through each row of data
            for ($row = 0; $row<count($data); ++$row) {

                // draw the row of cells
                $this->drawRow($data[$row], null);

            }

            
        }
        

    }
public function draw($data) {
        
        // if the data is sane, and the widths have been set (if not calculate them)
        if ($this->dataCheck($data)) {
            
            // calculate the widths
            $this->calculateWidths($data);
            
            // if at least one of the columns has header text
            if ($this->hasHeader()) {
                
                // bold and underscore for the title
                $style = new Style();
                $style->setBold()->setUnderscore();

                $headers = $this->getHeaderText();
                
                // draw the row of cells
                $this->drawRow($headers, $style);       
                
            }
            
            // go through each row of data
            for ($row = 0; $row<count($data); ++$row) {

                // draw the row of cells
                $this->drawRow($data[$row], null);

            }

            
        }
        

    }
public function draw ( $ data ) { // if the data is sane, and the widths have been set (if not calculate them) if ( $ this -> dataCheck ( $ data ) ) { // calculate the widths $ this -> calculateWidths ( $ data ) ; // if at least one of the columns has header text if ( $ this -> hasHeader ( ) ) { // bold and underscore for the title $ style = new Style ( ) ; $ style -> setBold ( ) -> setUnderscore ( ) ; $ headers = $ this -> getHeaderText ( ) ; // draw the row of cells $ this -> drawRow ( $ headers , $ style ) ; } // go through each row of data for ( $ row = 0 ; $ row < count ( $ data ) ; ++ $ row ) { // draw the row of cells $ this -> drawRow ( $ data [ $ row ] , null ) ; } } }
Draw the grid of data
@param $data
Draw the grid of data