Is it possible to sort rows by a custom array of ids given from another table or somehow.
$str = "5,2,3,6,911,18,118,65,985,15...";  
$arr = explode(',', $str);
function get_titles($status){
    global $db;
    $sql = "select * from arts where status = :astatus order by " . $arr . " asc";
    $st = $db->prepare($sql);
    $st->execute([":astatus" => $status]);
    ...
}
