I have array such as:
$arr = [
0=>['note_id'=>1,'content'=>1],
1=>['note_id'=>2,'content'=>2],
2=>['note_id'=>3,'content'=>3],
];
And I have array of ids:
$ids=[2,3,1];
I need get new array from arr by using the sorting this array by value 'note_id' and array ids, so resut must be:
$arr = [
1=>['note_id'=>2,'content'=>2],
2=>['note_id'=>3,'content'=>3],
0=>['note_id'=>1,'content'=>1],
];
Are there any functions for this? Thanks!