title: problem calling a php method from within itself
body: <pre><code>class styleFinder{
  
  function styleFinder(){
  
  }
  
  function getFilesNFolders($folder){
  
      $this-&gt;folder = $folder ;
      if($this-&gt;folder==""){
          $this-&gt;folder = '.';
      }
      if ($handle = opendir($this-&gt;folder)) {
          while (false !== ($file = readdir($handle))) {
              if ($file != "." &amp;&amp; $file != "..") {
                  echo "$file&lt;br /&gt; ";
                  if(is_dir($file)){
  
                      echo "&lt;b&gt;" . $file . " is a folder&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;with contents ";
                      $this::getFilesNFolders($file);
                     # echo "Found folder";
                  }
              }
          }
          closedir($handle);
      }
  }
  </code></pre>
  
  <p>}
  I wan to print out a complete tree of folders and files, the script is going into the first folders and finding the files, then finding any sub folders, but not subfolders of those (and yes there is some). Any ideas please?</p>