$myself="blog.php"; $files=Array(); //==================================================================================================================================================================== // Blog //==================================================================================================================================================================== $dir="blog"; $d = dir($dir); while ($entry = $d->read()) { if(substr($entry,-3)=="txt") { $files[]=substr($entry,0,strlen($entry)-4); $type[]="blog"; $class[]="blog"; $date[]=substr(substr($entry,0,strlen($entry)-4),0,6); } } $d->close(); array_multisort($files,SORT_DESC,$type,$class,$date); $mesi=array(); foreach($date as $value) if(!in_array($value,$mesi)) $mesi[]=$value; foreach($mesi as $value) $frq["$value"]=0; foreach($date as $value) $frq["$value"]++; $howmany=6; $total=count($files); ?>