I am trying to display a random page from a file called ../health/ In this file there is a index.php file and 118 other files named php f
To compliment Jack's answer, with preg_grep() you can also do:
$files = array_values( preg_grep( '/^((?!index.php).)*$/', glob("*.php") ) );
This will return an array with all files that do NOT match index.php directly. This is how you could invert the search for index.php without the PREG_GREP_INVERT flag.