title: php echo results in alphabetical order
body: <p>This code below will echo the keyword in each file, Is it possible to get the results (Keyword from each file) to display in alphabetical order.</p>
  
  <pre><code>&lt;?php 
  $files = (glob('{beauty,careers,education,entertainment,pets}/*.php', GLOB_BRACE)); 
  
      $selection = $files;
      $files = array();
  
      $keywords = $matches[1];
  
      foreach ($selection as $file) {    
      if (basename($file) == 'index.php') continue;
      if (basename($file) == 'error_log') continue;
      $files[] = $file;    
  }
      foreach($files as $file) {
          $title = str_replace('-', ' ', pathinfo($file, PATHINFO_FILENAME));
  
      $content = file_get_contents($file);
      if (!$content) {
  
          echo "error reading file $file&lt;br&gt;";
      }
      else {
          preg_match("/keywords = \"(.*?)\"/i", $content, $matches);
          $keywords = $matches[1];
      }
          $results .= '&lt;li&gt;&lt;a href="http://domain.com/' . htmlentities($file, ENT_QUOTES) . '"&gt;'.$keywords.'&lt;/a&gt;&lt;/li&gt;';    
  }
  ?&gt;
  &lt;?=$results?&gt;
  </code></pre>