Phpforeach returns the sample code in inverted positive Order. Implementation Code: foreach ($ filesas $ file_num $ file) {if (is_file ($ directory. $ file) {$ fileiconv (gb2312, UTF-8, $ file); or iconv (gb2312, UTF-8, $ value); $ date implementation code:
// Foreach ($ files as $ file_num => $ file) {if (is_file ($ directory. $ file) {// $ file = iconv ("gb2312", "UTF-8", $ file); // or iconv ("gb2312", "UTF-8 ", $ value); $ date = substr ($ file, 0, 9); echo'
'; Echo ''; echo'';}} // Inverted foreach (array_reverse ($ files) as $ file_num =>$ file) {if (is_file ($ directory. $ file) {// $ file = iconv ("gb2312", "UTF-8", $ file); // or iconv ("gb2312", "UTF-8 ", $ value); $ date = substr ($ file, 0, 9); echo'
'; Echo ''; echo'';}}
Else // foreach ($ files as $ file_num = $ file) {if (is_file ($ directory. $ file) {// $ file = iconv ("gb2312", "UTF-8", $ file); // or iconv ("gb2312", "UTF-8 ", $ value); $ date...