Código PHP:
Ver originalclass htmlTable{
var $columnas;
var $width;
var $cellpadding;
var $cellspacing;
var $border;
var $align;
var $id;
var $name;
var $class;
var $style;
var $head;
var $jQuery_dataTables;
private $tr;
//Abrir la etiqueta <table> y asignar los atributos establecidos.
private function open(){
$open = "<table ";
if(isset($this->width)){ $open .= 'width="'.$this->width.'" '; } if(isset($this->align)){ $open .= 'align="'.$this->align.'" '; } if(isset($this->border)){ $open .= 'border="'.$this->border.'" '; } if(isset($this->cellpadding)){ $open .= 'cellpadding="'.$this->cellpadding.'" '; } if(isset($this->cellspacing)){ $open .= 'cellpadding="'.$this->cellspacing.'" '; } if(isset($this->id)){ $open .= 'id="'.$this->id.'" '; } if(isset($this->class)){ $open .= 'class="'.$this->class.'" '; } if(isset($this->name)){ $open .= 'name="'.$this->name.'" '; } if(isset($this->style)){ $open .= 'style="'.$this->style.'" '; } $open .= ">\r\n";
return $open;
}
private function head($array){
$head = " <thead>\r\n";
foreach($array as $th){
}
$head .= " </thead>\r\n";
return $head;
}
//cerrar la etiqueta </table>
private function close(){ return "</table>"; }
//concatenar las etiquetas generadas
function render(){
$render = $this->open();
$render .= $this->head($this->head);
$render .= "<tbody>\r\n";
$render .= $this->tr;
$render .= "</tbody>\r\n";
$render .= $this->close();
return $render;
}
hasta ahí llevo, pero me quedé en eso, pensando en como hacer para poner el tbody.