How to manually change the sorting of an array of values in PHP
<p>I'm working on a Wordpress theme that needs to display a couple of thousand posts referencing places. These places are sorted by large area, and then from south to north. I have grouped posts into neighborhoods using a custom field and am manually entering that. (This is in NYC: there's no fixed neighborhood frontier so that would have to be done by hand anyway.) However, I then want to use ZIP codes to sort the posts. </p>

<p>The problem is that 5-digits zipcodes don't have any order. The 4 additional numbers do. Since there's only a few zipcodes per neighborhood, I thought I could manually sort the zip codes, and then automatically sort the ZIP+4.</p>

<p>My current code is:</p>

<pre><code>array_multisort($thearea, SORT_ASC, $thezipcode, SORT_ASC, $thezipcode2, SORT_ASC, $calendar);
</code></pre>

<p>I was wondering if there is a way to replace "SORT_ASC" with a custom order? I need to still be able to sort by area first, then a custom order on Zip, then an ascending order on Zip+4.</p>