Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/03/2009, 00:24
jpneruda
 
Fecha de Ingreso: mayo-2008
Mensajes: 34
Antigüedad: 16 años
Puntos: 1
Respuesta: Pregunta simple sobre variables!!

Si entiendo bien, suelo trabajar de la misma manera. Necesitas hacer un eval a plantilla.html para que interprete las variables.

Esta es la función que suelo utilizar:

Código PHP:
function matriz($template_archivo) {
    
$template_leo file_get_contents("templates/$template_archivo");
    
$template_leo str_replace('"','\"',$template_leo);
    return 
$template_leo;
}
eval(
"\$contenido = \"".matriz("plantilla.html")."\";");