<?php
  function recurse($dir,$level=1){
     $handle = opendir($dir);
  $spaces = str_repeat('&nbsp;',$level * 5);
  $filespaces = str_repeat('&nbsp;',$level * 10);

    while (false !== ($file = readdir($handle))) {
      if ($file == '.' || $file == '..') continue;
        $path = $dir.'/'.$file;
        if (is_dir($path)){
          echo $spaces.$file.'<br>';
          recurse($path,$level++);
         }
        else
           {
        echo $filespaces.$file.'<br>';
           }
    }
    

  }
recurse('./workshop');
?>