Hi,
I am using php to pull results off a mysql database. I am using a single php/html file to generate a number of different display_result pages (passing a different variable onto the file when calling it to display a different set of results).
I'd like to add a different graphic for each different results page and I am thinking that to do this from a single php file my image has to be driven by the variable.
So let's say $var1=setA, I can name the image corresponding to the results page generated by the setA variable setA.gif, and then point to the image by using $var1.gif. Am I trying to do the impossible? because I can't get it to work.
My line in the php/html file is:
print "<img src=setA.gif>";
and this of course works fine, but
print "<img src=$var.gif>";
gets me nowhere.
Thanks in advance and sorry if this is a stupid question.