I have a PHP file with my database configuration settings defined as constants, for example:
Just put it outside the quotes and it should work fine:
$query = "SELECT users FROM ".DB_TABLE_1;