Sort array using another array as input
I would like to sort the following array using another array provided bellow.

For example. I have the following array:

    [note] => Array
    (
       [0] => 'note1'
       [1] => 'note2'
       [2] => 'note3'
    ), 
    [text] => Array
    (
       [0] => 'text1'
       [1] => 'text2'
       [2] => 'test3'
    ), 
    [year] => Array
    (
       [0] => '2002'
       [1] => '2000'
       [2] => '2011'
    )

And I have the array:

    $sortBy = array('2011', '2000', '2002').

I would like to sort the above array according the values of $sortBy array.

The desired result is:

    [note] => Array
    (
       [2] => 'note3'
       [1] => 'note2'
       [0] => 'note1'
    ), 
    [text] => Array
    (
       [2] => 'test3'
       [1] => 'text2'
       [0] => 'text1'
    ), 
    [year] => Array
    ( 
       [2] => '2011'
       [1] => '2000'
       [0] => '2002'
    )
Sort array using another array as input
===

I would like to sort the following array using another array provided bellow.

For example. I have the following array:

    [note] => Array
    (
       [0] => 'note1'
       [1] => 'note2'
       [2] => 'note3'
    ), 
    [text] => Array
    (
       [0] => 'text1'
       [1] => 'text2'
       [2] => 'test3'
    ), 
    [year] => Array
    (
       [0] => '2002'
       [1] => '2000'
       [2] => '2011'
    )

And I have the array:

    $sortBy = array('2011', '2000', '2002').

I would like to sort the above array according the values of $sortBy array.

The desired result is:

    [note] => Array
    (
       [2] => 'note3'
       [1] => 'note2'
       [0] => 'note1'
    ), 
    [text] => Array
    (
       [2] => 'test3'
       [1] => 'text2'
       [0] => 'text1'
    ), 
    [year] => Array
    ( 
       [2] => '2011'
       [1] => '2000'
       [0] => '2002'
    )