Well I need to take everything one step further now.
So that you know exactly how each section is coded I have include them below for your reference (if you feel the urge to check them for problems go ahead).
Main content area of index.php
<?
$new_page = array( "home" , "calendar" , "library" , "reviews" , "bulletin" , "directions" , "contact" );
if (isset($_GET['page'])) {$page = $_GET['page'];}
else {$page = 'home';}
if (in_array("$page", $new_page)) {include($page . '.php');}
?>
Code for the Digital Library (library.php)
<?
$path = 'library/';
$handle = opendir($path);
while (($file_name = readdir($handle)) !== false)
{
if ($file_name != '.' && $file_name != '..' && $file_name != '_vti_cnf' && !strstr($file_name, '.php') && !strstr($file_name, '.jpg') && !strstr($file_name, '.gif'))
{
$file_array[] = $file_name;
}
}
sort($file_array);
$num_columns = 2;
$col = 0;
while (list(, $value) = each($file_array)){
$col++;
$file_parts = explode (".", $value);
$file_title = $file_parts[0];
if ($col == 1) {
echo "<tr>";
}
echo '<td id="libbook"><a id="liblink" href="index.php?page=' . $file_title . '"><b>' . $file_title . '</b></a></td>';
if ($col == $num_columns) {
echo "</tr>";
$col = 0;
}
}
?>
Now what I need is for include from the index.php segment of code to include the value of $file_title form the digital library.
I am assuming that to do this the value of $file_title needs to be in the $new_page array but to put it in there before it has been defined will just cause an error. And I don't see how I could define it before hand.
I keep looking back over everything I just got this gut feeling that this is has an easy solution.
Also one other note whatever solution is arrived at must also allow me to pass the value of $file_title to the new page. (I think I have this part figured out)