PDA

View Full Version : variable in eval.


exTracT
03-19-2004, 10:41 PM
super quick question, im banging my head on the wall with this one, how do you use a variable in the template name you want to assign to a variable?? Look at the code, you;ll see what i mean right away, thanks

instead of this:
eval('$something = "' . fetch_template('template_name') . '";');

i want to do this: (or something like it):
eval('$something = "' . fetch_template('$template_name') . '";');



edit-ah crap, i realize this is wrong forum, some how i ended up here cause i searched here last, my apologies, its friday night, im distracted :nervous:

Xenon
03-19-2004, 11:54 PM
*moved to the correct forum*

and the answer is: remove the ' around the template name's variable :)