is it possible to sort an array by keys using an custom order ? i have an array with strings that represent the order.
$order = array('ccc','aaa','xxx','111');
$myarray = array('ccc' => 'value1','aaa' => 'value2','xxx' => 'value3',
'BBB' => 'value11','ddd' => 'value31')
now i want the array to be sorted with the elemnts with the key 'ccc' at the first position, the nthe elements with the key aaa ... and at the end should be the elements that are not in the sortlist.
is this possible ?
edit: the second 'CCC' was my fault - sorry