$a = [
["userid"=>"2",name="z"],
["userid"=>"1",name="l"],
["userid"=>"4",name="w"],
["userid"=>"3",name="h"],
];
how to advance userid= > 4, this line to the first position. Become
$a = [
["userid"=>"4",name="w"],
["userid"=>"2",name="z"],
["userid"=>"1",name="l"],
["userid"=>"3",name="h"],
];
What wants to achieve is that the selected item is put first, and the foreground list is too long for the user to see which one has been selected.
find someone else to write, he seems to take the last one to the front, it doesn"t seem to work.
$a = array ("averse," baked,"c");
array_unshift ($a, array_pop ($a));
var_dump ($a); die;