I'm using a prepared statement for a query that returns multiple results, which I'd want to have in an array. But bind\_result won't work with arrays, so this is how I do it:

```
$read_items = $db->stmt_init();
$read_items->prepare("SELECT item_id, item_name FROM items");
$read_items->execute();
$read_items->bind_result($var1, $var2);
while ($read_items->fetch()) {
  $item_id[] = $var1; 
  $item_name[] = $var2;
}

```

Is there clearer/better/more elegant way to put results into $item\_id and $item\_name arrays?

As it's visible from above, I'm using $var1 and $var2 like "intermediates" - and constantly have feeling there must be a better way.

Thanks.