I have a csv string and need to select rows having corresponding id.  

And need to do something specific if a row doesn't exist.

```
$str = '1,2,3,4,5,6,7,8,9,10,11,12';
$st = $db->query("select *
                  from arts
                  where id in (" . $str . ")
                  order by field (id, " . $str . ")");
$arr = $st->fetchAll(PDO::FETCH_ASSOC);
foreach ($arr as $el) {
    // if ($el is missing) {echo 'the row is missing';}  // how to do this?
    else { ... }
}

```