Ver Mensaje Individual
  #6 (permalink)  
Antiguo 05/03/2010, 09:03
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 15 años, 4 meses
Puntos: 334
Respuesta: Mostrar cero en la tabla.

bueno yo tengo una funcion para hacer tablas
revisala haber si te sirve

Código PHP:
Ver original
  1. function table($attributes = array(), $rows = 0, $cols = 0, $content = array()){
  2.         $table = "<table"; $table_content = "";
  3.         if(!empty($attributes)){
  4.             if(is_array($attributes)){
  5.                 foreach($attributes as $key => $value){
  6.                     $key = strtolower($key);
  7.                     if(in_array($key, $this->attributes)){
  8.                         $table .= ' '.$key.'="'.$value.'"';
  9.                     }else{
  10.                         $this->error(sprintf(TEMPLATE_ATTR_ERROR, '<b>'.$key.'</b>'));
  11.                     }
  12.                 }
  13.             }else{
  14.                 $this->error(TEMPLATE_REQ_ARRAY_TYPE);
  15.             }
  16.         }
  17.         if(!empty($content)){
  18.             if(!is_array($content)) $this->error(TEMPLATE_REQ_ARRAY_TYPE);
  19.         }
  20.         if(is_int($rows) && is_int($cols)){
  21.             if($cols > 0 && $rows > 0){
  22.                 for($i = 1; $i <= $rows; ++$i){
  23.                     $table_content .= "<tr>";
  24.                     for($o = 1; $o <= $cols; ++$o){
  25.                         $table_content .= (!empty($content[$i][$o])) ? "<td>".$content[$i][$o]."</td>" : "<td>&nbsp;</td>";
  26.                     }
  27.                     $table_content .= "</tr>";
  28.                 }
  29.             }
  30.         }
  31.         $table .= ">".$table_content."</table>";
  32.         return $table;
  33.     }


PD: no uses la misma ya que esta dentro de una classe y no te funcionara de por si sola.. es solo para q tengas la idea
__________________
More about me...
~ @rhyudek1
~ Github