hola Jujogual, create un archivo php con esto y juega con la ultima linea, cuando lo entiendas lo aplicas a tu trabajo:
     
Código PHP:
Ver original- <? 
- //Inicio Funciones 
- function fechaNumero($f,$opc){ 
-     if(!$opc){ 
-         $fecha = mktime(0,0,0,$m,$d,$a)/(60 * 60 * 24); 
-     }else 
-     return $fecha; 
- } 
-   
- function diasemana($d) { 
-     $sem = array("Do","Lu","Ma","Mi","Ju","Vi","Sa"); 
-     return $sem[$d]; 
- } 
- //Término Funciones 
-   
-   
- //Inicio Clase 
- class claseTablaDias { 
-     function validarDatos($fecha_inicio,$fecha_fin,$array_asistencia){ 
-         $f1 = fechaNumero($fecha_inicio,0); 
-         $f2 = fechaNumero($fecha_fin,0); 
-         $this->fi = $fecha_inicio; 
-         $this->asist = $array_asistencia; 
-         $this->dif_dias = $f2 - $f1 + 1; 
-         if($this->dif_dias>0) { 
-             $this->crearTablaDias($array_asistencia); 
-         }else{ 
-             print "error datos"; 
-         } 
-     } 
-      
-     function crearTablaDias(){ 
-         print "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n"; 
-         for($row=0;$row<3;$row++){ 
-             list($d,$m,$a) =-  fechaNumero ($this->fi,1);
 
-             print "<tr>\n"; 
-             for($i==0 ; $i<$this->dif_dias ;$i++){ 
-                 print "<td align=\"center\">"; 
-                 if($row==0) 
-                 print-  diasemana (date("w",mktime(0,0,0,$m,$d,$a)));
 
-                 elseif($row==1) 
-                 elseif($row==2){ 
-                     if($this->asist[$i]==1) 
-                     print "x"; 
-                     else 
-                     print " "; 
-                 } 
-                 $d++; 
-                 print "</td>"; 
-             } 
-             print "</tr>\n"; 
-             $i=0; 
-         } 
-         print "</table>"; 
-     } 
- } 
- //Término Clase 
-   
-   
-   
- //$asistencia es la info como array 
- $asistencia = array(0,1,0,0,1,1,0,0,1,0,0,0,1,1,0,1); 
- //se crea el constructor 
- $const = new claseTablaDias; 
- //se ingresan los datos, fecha de incio, fecha de termino, array de asistencia 
- $const->validarDatos("20-8-2011","4-9-2011",$asistencia); 
- ?> 
salu2