title: php xpath sort alphabetically by field
body: <p>I'd like to have a more accurate alphabetical sort for xpath. My current system only sorts the first two characters of the field... I'd like it the order the whole field if possible.</p>
  
  <pre><code>foreach(range('A','Z') AS $firstletter) {
       foreach(range('a','z') AS $secondletter) {
                $letters = $firstletter.$secondletter;
                if($item-&gt;xpath("/Entries
                                    /Entry[
                                       starts-with(
                                          Field42,
                                          '".$letters."'
                                       )
                                     and 
                                       Field380 = 'Okay'
                                    ]")) {
  </code></pre>
  
  <p>The Field42 entries are lastnames (ie Brown, Brownstein, Brownwood, Byrnes,..)</p>