Is it possible in PHP to do something like this? How would you go about writing a function? Here is an example. The order is the most important thing.
$custo
Without magic...
$array=array(28=>c,4=>b,5=>a); $seq=array(5,4,28); SortByKeyList($array,$seq) result: array(5=>a,4=>b,28=>c); function sortByKeyList($array,$seq){ $ret=array(); if(empty($array) || empty($seq)) return false; foreach($seq as $key){$ret[$key]=$dataset[$key];} return $ret; }