original_string: public function render()
      {
          
          // Render the table container
          $output = "<table {$this->renderAttributes()} >\n\t<tbody>\n";
          
          // Render the heading
          $output .= "\t\t<th>\n";
          
          foreach ($this->_head as $heading) {
              
              $output .= "\t\t\t<td>{$heading}</td>\n";
              
          }
          
          $output .= "\t\t</th>\n";
          
          // Render the rows
          foreach($this->_rows as $row) {
              
              $output .= "\t\t<tr>\n";
              
              foreach($this->_head as $columnName) {
                  
                  $column = $row[$columnName];
                  
                  switch(gettype($column)) {
                      
                      case 'array':
                          $column = print_r($column, true);
                          break;
                      
                      case 'object':
                          $column = (method_exists($column, 'render')) ? $column->render() : 'Object';
                          break;
                      
                      case 'boolean':
                          $column = $column ? 'True' : 'False';
                          break;
                      
                      case 'unknown type':
                      case 'resource':
                      case 'NULL':
                          $column = 'NULL';
                      
                      default:
                          break;
                      
                  }
                  
                  $output .= "\t\t\t<td>{$column}</td>\n";
                  
              }
              
              $output .= "\t\t</tr>\n";
              
          }
          
          $output .= "\t</tbody>\n</table>";
          
          return $output;
          
      }
code: public function render()
      {
          
          // Render the table container
          $output = "<table {$this->renderAttributes()} >\n\t<tbody>\n";
          
          // Render the heading
          $output .= "\t\t<th>\n";
          
          foreach ($this->_head as $heading) {
              
              $output .= "\t\t\t<td>{$heading}</td>\n";
              
          }
          
          $output .= "\t\t</th>\n";
          
          // Render the rows
          foreach($this->_rows as $row) {
              
              $output .= "\t\t<tr>\n";
              
              foreach($this->_head as $columnName) {
                  
                  $column = $row[$columnName];
                  
                  switch(gettype($column)) {
                      
                      case 'array':
                          $column = print_r($column, true);
                          break;
                      
                      case 'object':
                          $column = (method_exists($column, 'render')) ? $column->render() : 'Object';
                          break;
                      
                      case 'boolean':
                          $column = $column ? 'True' : 'False';
                          break;
                      
                      case 'unknown type':
                      case 'resource':
                      case 'NULL':
                          $column = 'NULL';
                      
                      default:
                          break;
                      
                  }
                  
                  $output .= "\t\t\t<td>{$column}</td>\n";
                  
              }
              
              $output .= "\t\t</tr>\n";
              
          }
          
          $output .= "\t</tbody>\n</table>";
          
          return $output;
          
      }
code_tokens: public function render ( ) { // Render the table container $ output = "<table {$this->renderAttributes()} >\n\t<tbody>\n" ; // Render the heading $ output .= "\t\t<th>\n" ; foreach ( $ this -> _head as $ heading ) { $ output .= "\t\t\t<td>{$heading}</td>\n" ; } $ output .= "\t\t</th>\n" ; // Render the rows foreach ( $ this -> _rows as $ row ) { $ output .= "\t\t<tr>\n" ; foreach ( $ this -> _head as $ columnName ) { $ column = $ row [ $ columnName ] ; switch ( gettype ( $ column ) ) { case 'array' : $ column = print_r ( $ column , true ) ; break ; case 'object' : $ column = ( method_exists ( $ column , 'render' ) ) ? $ column -> render ( ) : 'Object' ; break ; case 'boolean' : $ column = $ column ? 'True' : 'False' ; break ; case 'unknown type' : case 'resource' : case 'NULL' : $ column = 'NULL' ; default : break ; } $ output .= "\t\t\t<td>{$column}</td>\n" ; } $ output .= "\t\t</tr>\n" ; } $ output .= "\t</tbody>\n</table>" ; return $ output ; }
docstring: Renders the table and returns it as a string.
  
  @return string
docstring_tokens: Renders the table and returns it as a string .