I have two arrays:
$arr_a = ['A', 'F', 'C', 'D', 'E', 'B'];
$arr_b = ['D', 'A', 'F'];
, and I need an array with values of $arr_b that is sorted by $arr_a, like this:
array(3) {[0]=>string(1) "A", [1]=>string(1) "F", [2]=>string(1) "D"}
What would be the best way to do it?
PS. All the entries in $arr_b are present in $arr_a, and there is no double entries in $arr_b, and the keys in resultin array are irrelevant, really.
$arr_bcontains more items or items that are not in$arr_a?