Sort Result array by an Array with keys
===

I have 2 Arrays:

(1) Array with Key => Value, and Array (2) with no relevant Keys and as Values the keys from array 1 in different order. Is there an elegant solution to put array 1 in the same order like the values in array two?

    $data = array(
    'NAME' => 'XYZ',
    'NUMB' => 1234,
    'CITY' => 'TEST'
    );

    $sort = array(
    'A1' => 'CITY,
    'XY' => 1234,
    'XX' => 'NAME,
    );

    $result = array(
    'CITY' => TEST,
    'NUMB' => 1234,
    'NAME' => 'XYZ',
    );