$value){ $page[] = $key; } $pages = array('index','news','hlinks','pics','tos','contact','sched','sitemap','ver'); head(); if(isset($page[0])){ if(in_array($page[0], $pages)) // and page is in your approved array, do that function rf($page[0]); // elseif(isset($page[0])) // if it isnt, do the 404 page // error($page[0]); else // anything else, do index rf('index'); } else // if isnt set, do index rf('index'); foot(); function rf($file){ echo '
'; readfile($file.'.luc'); echo '
'; echo ''; } function head(){ echo '
'; } function foot(){ echo '
'; } function error($p){ echo $p.' isnt a valid page link Click Here To Return to Index'; } ?>