ok first before I explain the problem here's the code that I'm experiencing the problem with.
<?php
require('general.php'); //connect to the database
$layout = "void";
$templates = $layout . "_temps";
$layouts = mysql_query("SELECT template FROM template WHERE title='".addslashes($templates)."'");
if($layouts != ""){
$layouts = mysql_fetch_array($layouts);
$layouts = $layouts[template];
$layouts = explode(";", $layouts);
}else{
echo "There seems to be a problem with the layout you are trying to call. Go to the main page and select Login with E-ops and try fix the layout in your options to something different than current";
exit();
}
$numlay = count($layouts);
$numlay = $numlay - 1;
$num = 0;
while($num <= $numlay){
$thislayout = mysql_query("SELECT template FROM template WHERE title='".addslashes($layouts[$num])."'");
$thislayout = mysql_fetch_array($thislayout);
$thislayout = $thislayout[template]; // set $thislayout to the template titled void_css
$varname = '$' . $layouts[$num]; // set $varname to $ + text of $layouts ($varname now = $void_css)
eval("\$varname = \"$thislayout\";"); // set the variable contained in $varname to $thislayout ($void_css in this case)
$num++; // add one to $num
}
echo "$void_css"; // return the variable set
?>
Ok now the problem I'm having is centrally focused around the Eval() I'm not sure how to have the eval instead of making $varname equal the template but make the contents of $varname equal the template. Anyone able to help?