'; foreach($table['data'] as $row) { $return.= theme_tablerow($row['data'], $row['attrs']); } $return.= ''; } //Génération d'une ligne de tableau function theme_tablerow($data, $attrs) { $return = ''; if( isset($row['head']) ) $return.= theme_tablehead($row['data']); else $return.= theme_tablecell($row['data']); $return.= ''; return $return; } // Génération entete de tableau function theme_tablehead($data, $attrs) { return ''.$data['data'].''; } //Génération cellule function theme_tablecell($data, $attrs) { return ''.$data['data'].''; } //Génération d'un div function theme_div() { } function theme_attr($attributs) { $attrs = ''; if(is_array($attributs) && count($attributs)>0) { foreach( $attributes as $attr_name as $attr_value ) { $attrs.=' '.$attr_name.'="'.$attr_value.'"'; } } return $attrs; }