title: PHP script to write a list of folder names inside a directory into .html file
body: <p>I would like to create a php script which reads the folders located in a specific directory and writes the names in a .html file, the structure of the HTML should be:</p>
  
  <pre><code>&lt;ul class="galleries"&gt;
  &lt;li&gt;&lt;a href=".../control/includes/gallery-select.php?g=folder-xx"&gt;Gallery 1&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=".../control/includes/gallery-select.php?g=folder-xx"&gt;Gallery 2&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>where folder-xx are the names of the folders in control\data\img\gallery\</p>
  
  <p>I'm not a big expert of php so i'll be grateful for any hint.. and sorry for the english.</p>
  
  <p>Thanks</p>