yes it's possible

Actually, it is possible. What you need to do is first create a variable that will contain the name of your table, then put that into the sql statement, except don't put the variable within single quotes:

$dynamic_table_ name = "table"; (of course, this is where you would make it dynamic)

then, unlike the usual method of putting varibles in mysql statements - '$dynamic_table _name'...