Ok let me give you soem more bg info. The variables for template.php are coming from another page called form.php which is, obviously, a form. One of the fields in the form asks for page name. So I enter "page", for example".
So then the variable $page_name gets sent to the template.
$$page_number means whatever the value for this variable is, is going to be added to $page_name. So .php is going to be added to the page name.
$page_name${$page_name} actually adds $$page_name to $page_name thus making page.php
you can also do that to make sentance
$sentance = thanks
$$sentace = for your help
$sentance ${$sentance} = thanks for your help