I have the following two hypothetical arrays:
$values = array("fourth", "first", "second", "third");
$indices = array(3, 0, 1, 2);
What is the fastest way to rearrange $values
based on $indices
?
Is there perhaps some way to do $values->index_array = $indices
?