Let's say I have the following directory tree  

```
tmp
 ---cat
 ---dog
 ---mouse

```

My index.php is in the same directory as `tmp` folder. How would I use PHP to save a random folder name as a variable? I've tried the following code but it didn't work.

```
<?php
function listFolderFiles(){
    $dir = './tmp';
    $ffs = scandir($dir);
    $randomFolder = '';
    foreach($ffs as $ff){
        if($ff != '.' && $ff != '..'){
            $randomFolder = $randomFolder + $ff;
        }
    }
        echo $randomFolder;
    echo '</ol>';
}
listFolderFiles();
?>

```