Sort array of objects by object param, then sort those by another param alphabetically
<p>So, I have an array of objects that I want to sort like so:</p>

<pre><code>Array
(
[463] =&gt; stdClass Object
    (
        [name] =&gt; Organic 12
        [total_weight] =&gt; 5
    )
[340] =&gt; stdClass Object
    (
        [name] =&gt; Organic 12b
        [total_weight] =&gt; 5
    )
[340] =&gt; stdClass Object
    (
        [name] =&gt; Organic 12c
        [total_weight] =&gt; 5
    )
[532] =&gt; stdClass Object
    (
        [name] =&gt; Alpha 10
        [total_weight] =&gt; 4
    )
[203] =&gt; stdClass Object
    (
        [name] =&gt; General 5
        [total_weight] =&gt; 3
    )
</code></pre>

<p>)</p>

<p>Where the total_weight of all objects is sorted highest to lowest, then within those sorts, the objects are sorted alphabetically by name. I successfully can sort them by total_weight with php's usort, but can't figure out how to sub-sort the result. Using usort only, there's no consistency in the sorted results so one object's name might appear above another's in one result, but not in another. </p>

<p>I'm thinking perhaps array_multisort might be the answer, but I can't seem to figure it out. </p>
