Why won't unset remove index.php from the results I am echoing out?
$files = array(
'0' => 'bob.php',
'1' => 'index.php',
'2' => 'fred.php'
);
foreach ($files as $key => &$file) {
if(in_array($file, array('index.php'))) {
echo 'test condition<br />'; // Yes, this condition is met
unset($files[$key]);
}
echo '<a href="'.$file.'">'.$file.'</a><br />'."\n";
}
To make this I actually followed the answers for this stackoverflow question.