Where In Sort order

SELECT * FROM project_features WHERE id IN (3,1) ORDER BY FIELD(id, 3,1)

php array sort

array(4) {
[0] => int(2)
[1] => int(5)
[2] => int(1)
[3] => int(3)
}

:After KRSORT by index key desc
array(4) {
[3] => int(3)
[2] => int(1)
[1] => int(5)
[0] => int(2)
}

:ARSORT – by value desc
array(4) {
[1] => int(5)
[3] => int(3)
[0] => int(2)
[2] => int(1)
}

:array_reverse
array(4) {
[3] => int(3)
[2] => int(1)
[1] => int(5)
[0] => int(2)
}