Stump of a Muffin

Tag: array

Alphabetize an Array

Reading a directory and putting the files found into an array shouldn’t be such a big deal, right?  How about alphabetizing that array? function read_a_directory( $DIR ) { if ( is_dir( $DIR ) ) { if ( $dh = opendir( $DIR ) ) { while ( ( $file = readdir( $dh ) ) !== false…