Robert Cummings wrote:
On Wed, 2004-06-02 at 12:59, John Nichel wrote:
What I would like to do is sort this on the value of 'sort' in each sub-array. What am I missing???? TIA


usort( $theAboveArray, 'mySortHandler' );

function mySortHandler( $v1, $v2 )
{
    if( $v1['sort'] > $v2['sort'] )
    {
        return 1;
    }
    else
    if( $v1['sort'] < $v2['sort'] )
    {
        return -1;
    }

    return 0;
}

Cheers,
Rob.

That did the trick. Thanks.

--
John C. Nichel
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to