I am trying to sort an array based on another array. I think what I'm looking for is the usort() function but I have no idea what to write for the function. Would someone be so kind as to point me in the right direction?
Here is the array
$test['AAAAA'] = array ( 'img' => 'imgA.gif' );
$test['BBBBB'] = array ( 'img' => 'imgB.gif' );
$test['CCCCC'] = array ( 'img' => 'imgC.gif' );
I would like to sort that array but using the following array's order:
$sorter = array('CCCCC', 'AAAAA', 'BBBBB');
Is that possible even?