adbox
01-28-2010, 10:08 PM
Hey
I have built a template html variable:
$html
and want to setup some variables within that $html variable so when I write it I can call the php variables from within that file.
Here is an example of how far I have got:
$html .= "<?php \$var1='".$var1."'; ?>";
$html .= "<?php \$var2='".$var2."'; ?>";
...
eval("\$html = \"$html\";");
$fh = fopen($file, 'w');
fwrite($fh, $html);
fclose($fh);
I have built a template html variable:
$html
and want to setup some variables within that $html variable so when I write it I can call the php variables from within that file.
Here is an example of how far I have got:
$html .= "<?php \$var1='".$var1."'; ?>";
$html .= "<?php \$var2='".$var2."'; ?>";
...
eval("\$html = \"$html\";");
$fh = fopen($file, 'w');
fwrite($fh, $html);
fclose($fh);