ri posto perchè manca una stringa commentata ecco:

Codice PHP:
                //$files = glob('*.pdf'); 
                                    
$files glob('*.txt'); 

                               foreach (
$files as $file) { 
                                    
                                        
$fileName basename($file); 
                                       
// $data = explode(';', file_get_contents("{$file}.txt")); 
                    
$data explode(';'file_get_contents("{$file}")); 
                                        
$format strtotime($data[2]); 
                                        
$array[$format]['titolo'] =  $data[0]; 
                                        
$array[$format]['descrizione'] =  $data[1]; 
                                        
$array[$format]['name'] = $fileName
                                        
$array[$format]['tempo'] = $data[2]; 
                                        }