Example:
$arr = array('willion','kevien','john','smith');
$orderedArr = array('anne','bold','hellen','john','kevien','polm','smith','willion');
And I want to resort the $arr order based on $orderdArr order. How do I do that?
The result I expect:
'john','kevien','smith','willion'
the $orderedArr may be changed in order,So I want the $arr's order to be the same as $orderedArr.
I am sorry for simplifed my question.I think my $arr is much more complexity,the $arr's strucuture is: I use print_r() to show the array.
array( [0] => array([id]=>1 [name]=>willion)
[1] => array([id]=>2 [name]=>kevien)
[2] => array([id]=>3 [name]=>join)
)
Thank you very much!