title: How to hide blank array and just leave array's value/name?
body: <p>I am using jquery autocomplete plugin. How to hide blank array and just leave array's value/name? For example</p>
  
  <p>Html :  </p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  
      $(function() {
  
          $("#ac5").autocomplete('search.php', {
              minChars: 1,
  
          });
  
         });
  
          &lt;/script&gt;
      &lt;form&gt;
              &lt;input type="text" id="ac5"&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>Php : </p>
  
  <pre><code>/*
   * Load sample data
   */
  
  $dir    = '../image/imagefiles/';
  $images = scandir($dir);
  
  
  
  
  /*
   * Results array
   */
  $results = $images;
  
  /*
   * Autocomplete formatter
   */
  function autocomplete_format($results) {
      foreach ($results as $result) { 
          echo $result;
      }
  }
  
  /*
   * Output format
   */
  $output = 'autocomplete';
  if (isset($_GET['output'])) {
      $output = strtolower($_GET['output']);
  }
  
  /*
   * Output results
   */
  if ($output === 'json') {
      echo json_encode($results);
  } else {
      echo autocomplete_format($results);
  }
  </code></pre>
  
  <p>Output of autocomplete :     <code>...Dj_Etrom_Remix1.jpgDj_Etrom_Remix2.jpgDj_Etrom_Remix3.jpg</code> it show me all files name in same line  but i want to do like this <code>Dj Etrom Remix.jpg</code>.</p>