$id = "1";
$name = "test" + $id;

だとすれば

$$name で $test1 にアクセスできるよん。