...

View Full Version : Making table name equal variable



briintex1
08-04-2007, 06:20 PM
Hello I was wondering if you might be able to help. I was wondering how I would make a table name equal a variable.

I have this


if ($display == "Premiums")
{
$premiums2='Premiums2'
$query2 "Select * from $premiums2";
}


but it does not seem to work, and I get the following error

Parse error: parse error, unexpected T_VARIABLE

GJay
08-04-2007, 06:34 PM
missing ; on the first line inside the if-block.
[edit] and a missing = on the other line.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum