If i undestand you right you want to build a complete array of all the rows you select from the database...
If so... do this.
$sql = "select * from table";
$result = $db->query($sql);
$rows = array();
for ($i=0 ; $i < count($items); $i++) {
$row = $db->getRow("SELECT id, name FROM table WHERE id='$items[$i]'");
if (DB::iserror($row)) { die($row->getMessage()); }
array_push($rows, $row); //This is new
echo "$row[0], $row[1]";
}
Don't now if you're familiar with the concept of a stack, but array_push adds an element to an array as you loop through your rows.
So in the end you'll have all your rows in one big array... And you can use it just like usual.
$id = $rows[4][0];
$name = $rows[4][1];