Prendela con le molle perchè è una prima bozza
ad ogni modo guarda se ti viene l'ispirazione

Codice PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
>
<
html>
<
head>
<
title>Untitled Document</title>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<
script language="JavaScript" type="text/JavaScript">
function 
_createElement(el,obj){
    var 
_eldocument.createElement(el);
    for(var 
prop in obj){
        if(
prop=='class'){
            
//fix ie behaviour
            
_el.classNameobj[prop];
        }
         
_el.setAttribute(prop,obj[prop]);
    }
    return 
_el;
};
function 
_createTextNode(text){
    return 
document.createTextNode(text);
};
function 
Grid(target){
    
this._targettarget;
    
this.display=function(){
           
this._table.cellSpacingthis._cellSpacing;
           
this._table.cellPaddingthis._cellPadding;
        
this._target.appendChild(this._table);
    }
    
this.setTable= function(cs,cp,obj){
        
this._table_createElement('table',obj);
        
this._cellSpacing cs;
        
this._cellPadding cp;
    }
    
this.setHeader=function(headers){
        
this._theaddocument.createElement('thead');
        var 
_trdocument.createElement('tr');
        for (var 
0headers.lengthi++){
            var 
_th document.createElement('th');
            
_th.appendChild(document.createTextNode(headers[i]));
            
_tr.appendChild(_th);
        }
        
this._thead.appendChild(_tr);
        
this._table.appendChild(this._thead);
   }
    
this.setBody=function(data){
        
this._tbodydocument.createElement('tbody');
        for (var 
0data.lengthi++){
            var 
_trdocument.createElement('tr');
            for(var 
prop in data[i]){
                var 
_td document.createElement('td');
                
_td.appendChild(document.createTextNode(data[i][prop]));
                
_tr.appendChild(_td);
            }
            
this._tbody.appendChild(_tr);
        }
        
this._table.appendChild(this._tbody);
   }
    
this.build=function(){
        
    }
}
window.onload=function(){
 var 
mybody =document.getElementsByTagName("body")[0];
var 
_table= new Grid(mybody)
_table.setTable(5,5,{'with':'500','class':'mytable'});
_table.setHeader(['ID','Title','Description']);
var 
p= [{'id':1,'title':'Hello','description':'hello descr'},{'id':1,'title':'Hello2','description':'hello2 descr'}];
_table.setBody(p);
//_table.build();
_table.display();

}
</script>

</head>

<body>
</body>
</html>