$entry_arrayz[ 'entry' ] is the field where everything will print.

I am using now :
PHP Code: 
          function RecurseFolderLister($d

    
$BasePath realpath($d); 
    
$Storage = array(); 
     
    if(
is_dir($BasePath)) 
    { 
        
$resource opendir($BasePath); 
        while(
false !== ($directory readdir($resource))) 
        { 
            if(
is_dir($BasePath '/' $directory) && !in_array($directory,array('.','..'))) //DirCheck the TypeCheck 
            

                
$Storage array_merge($Storage,RecurseFolderLister($BasePath '/' $directory)); 
            }else 
            { 
                if(
is_file($BasePath '/' $directory) && substr($directory,-3) == 'txt'
                { 
                    
//We have text file 
                    
$key = ($BasePath '/' $directory); 
                     
                    if(!isset(
$Storage[$key])) 
                    { 
                        
$Storage[$key] = 0
                    } 
                    
$Storage[$key]++; 
                } 
            } 
        } 
    } 
    return 
$Storage

$Storage RecurseFolderLister('fav'); 
asort($Storage); 
$i 0
foreach( 
array_reverse($Storage) as $filename => $total 

   
$entry_arrayz'entry' ]  .= file_get_contents($filename) . '('.$total.')' ;
     
$i++; 
     if(
$i == 10) break; 

But if you check the page you will see TEST(1)TEST2(1)TEST(1)

I must get TEST(2) TEST2(1)

And really thanks for your help so far !
Porsche_maniak Reviewed by Porsche_maniak on . PHP Scan dir for idetical files I am not good with php and will ask for help... * The folder is named 'fav' * There are subfolders in 'fav' * Each subfolder may contain a .txt file Needed --> * Check for identical .txt file names in all subfolders * Sort 10 most repeating identicals,show(echo) their contents and show(echo) times repeated (in brackets such as this one :D ) Rating: 5