I have this code that i use for a navigation bar:
<?php
$url = 'snip';
foreach (glob("pages/*") as $path1) {
$file1 = basename($path1);
$file2 = end(explode('_', $file1));
echo "<div class=\"navbutton\"><a style=\"color:#333333;\" href='{$url}index.php?page={$file1}'>$file2</a></div>";
}
?>
My folder looks like:
pages/
1_Home
2_About
404
I do not want it to include the file "404", is there a way i can remove it from the variable? Unset doesnt work for some reason.