Tag Archives: array_values

PHP List Files in Directory Excluding Index

PHP List all files in a directory excluding the index file from the list.

Functions used are array_values, preg_grep, glob, foreach and basename.

Another option using str_replace and !empty