soulless feelings"; $stampsImgList=scandir("../stamps"); foreach( $stampsImgList as $file ){ if( strpos( "$file", ".") != 0 ){ $stampsSelect .= ""; } } $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] =""; } ?>