Why not just put a variable into the select statement
$query="select * from title".$number;
If you do want to use variable variables what you need to know is assign a variable to hold the name of the variable and then call it using double dollar signs. That sounds like gibberish I hope this explains it a bit better.
<?
$title1="1";
$title2="2";
$title3="3";
$title4="4";
$title5="5";
for ( $loop=1; $loop<6; $loop++ )
{
$this_var="title".$loop;
echo "Variable ".$this_var." = ".${$this_var}."<BR>";
}
?>
You should get on screen
1
2
3
4
5
the bit ${$this_var} tell php to give the value of the variable that the variable this_var has stored as a value. in other words if you store title1 the value of the variable title 1 will be returned.
Hope that helps and you can understand it.
Mark.