It doesnt matter too much now as I'm restructuring it so that all queries have the same variable.
$section = "vacancies";
$global_item = mysql_fetch_array(mysql_query("SELECT * FROM vacancies WHERE id='$vacancies_id'"));
What I meant was that if you had a variable eg.
$foo = "bar";
$bar = "12345";
Convert the string value of $foo ("bar") to an actual variable name ($bar) and store the contents of $bar in a new common variable.
So if I had this in one file:
$foo = "bar1";
$bar = "12345";
include ("common.php");
and this is another
$foo = "bar2";
$bar2 = "67890";
include ("common.php");
common.php:
convert the string value in foo to a variable name
get the contents of this variable name and output it
so if $foo contents was "bar2" before the include was called, the include would output "67890"