soulless feelings"; $stampsImgList=scandir("../stamps"); foreach( $stampsImgList as $file ){ if( strpos( "$file", ".") != 0 ){ $name = ucwords(str_replace("_", " ",substr($file,0,-4))); $stampsSelect .= ""; } } // Build the background images list $bgdImgList = scandir("../synthesis"); $randomKeys = array_rand( $bgdImgList , 13 ); $bgdSelect=""; foreach( $randomKeys as $key ){ $file = $bgdImgList[ $key ]; if( strpos( "$file", ".") != 0 ){ $key = substr( $file, 11, -4 ); $bgdArr[$key] ="../synthesis/".urlencode($file); } } uksort( $bgdArr, "strnatcasecmp"); $init_key = array_keys($bgdArr)[count($bgdArr)-1]; $first = array( $init_key => $bgdArr [ $init_key ] ); foreach( $bgdArr as $key => $val ){ $bgdSelect .= ""; } ?>