title: Get custom field values in alphabetical order
body: <p>The function below lists the values ​​of a custom field in the order they are posted. example:</p>
  
  <ul>
  <li>Frank Capra</li>
  <li>Alfred Hitchcock</li>
  <li>Woody Allen</li>
  <li>Woody Allen</li>
  <li>Frank Capra</li>
  <li>Pedro Almodóvar</li>
  </ul>
  
  <p>I'd like to get this list in alphabetical order and without repetition, with a link to each item <code>&lt;a href="Woody-Allen"&gt;Woody Allen&lt;/a&gt;</code>. example:</p>
  
  <ul>
  <li>Alfred Hitchcock</li>
  <li>Frank Capra</li>
  <li>Pedro Almodóvar</li>
  <li>Woody Allen</li>
  </ul>
  
  <hr>
  
  <p>This is the code:</p>
  
  <pre><code>&lt;?php
  $movie_reviews = get_posts( 'numberposts=-1&amp;orderby=post_name' );
  foreach( $movie_reviews as $post ) : setup_postdata( $post );
  ?&gt;
  &lt;span&gt;
  &lt;?php $director = get_post_meta( $post-&gt;ID, "director", $single = true );
  if( $director !== '' ) {
  echo $director;
  } ?&gt;
  &lt;/span&gt;
  &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p>Is this possible?</p>