I want to sort elements in an array '$to_sort' with regards to how these elements are sorted in a different array '$sorting_order'.
However, I don't know how to handle the case when the two arrays contain different elements.
$sorting_order[]=[introduction,skills,education,experience]
$to_sort[]=[experience,skills,education]
This is the desired result:
$sorted[]=[skills,education,experience]
**SOLUTION: i got this solution that is,
$sorted = array_intersect($sorting_order, $to_sort);
print_r($sorted);
**