Ver Mensaje Individual
  #9 (permalink)  
Antiguo 23/04/2013, 13:05
vjrosk
 
Fecha de Ingreso: diciembre-2010
Mensajes: 35
Antigüedad: 13 años, 4 meses
Puntos: 0
Respuesta: Consulta codigo html + funcion php dentro de variable... es posible?

a ver si comprendo bien, esta deberia ser la solucion?
Código PHP:
Ver original
  1. if (!empty($_POST["dirper"])){
  2.     $contotal.='<td>'.muestra($datos[cod_dato]).'</td>';
  3.     $titulo.="<th> DIRECCION PARTICULAR </th>";
  4.  }
  5.  
  6.         while ($imprime = pg_fetch_array($r)){ 
  7.             $datos[$X][cod_dato]     =  $imprime[cod_dato];
  8.             $datos[$X][apellidos]    =  $imprime[apellidos];
  9.             $datos[$X][nombres]   =  $imprime[nombres];
  10.             $X++;
  11.         }
  12. header("Content-type: application/vnd.ms-excel");
  13. header("Content-Disposition:  filename=Autoridades_".date('d-m-Y_His').".xls");
  14.    
  15. echo "<table border=1>";
  16. echo $titulo;
  17.     foreach($datos as $fila){              
  18.         echo "<tr><td>$fila[apellidos]</td><td>$fila[nombres]</td>".$contotal."</tr>";
  19.                        
  20.         }
  21.         echo "</table>";                    
  22.         exit();


perdón mi insistencia, me estoy volviendo loco con esto. muchas gracias pateketrueke por toda la ayuda que me estas dando.