菜鸟PHP问题排序自定义字段的结果

I use this to pull values from a custom field with several values:

<?php  $mykey_values = get_post_custom_values('services');
    foreach ( $mykey_values as $key => $value ) {
    echo "<li> $value</li>";
    } ?>

I want to sort the output according to the way I have set up the values in the key (alphabetically)

$mykey_values = get_post_custom_values('services');
sort($mykey_values, SORT_STRING);
echo "<ul>
<li>" . implode('</li><li>', $mykey_values) . "</li>
</ul>";

Documentation for get_post_custom_values() and sort().

You could use the sort() function. See it's documentation.