I made an MySQL database. the field are: `ID:NAME:QUANTITY`

I do have for example:

```
ID:NAME:QUANTITY
1: APPLE: 3
1: APPLE: 4
2: BANANA: 1
2: BANANA: 2

```

Instead of having this output, I would like to get:

```
APPLE 7
BANANA 3

```

I have tried so many things, but I failed again and again. Do you guys have a solution? 

My code is:

```
 public function getList($user_id, $recept_id) {

  $return = array();
  $sql = "select * from list";

  $result = mysqli_query($this->link, $sql);
  while ($row = mysqli_fetch_assoc($result)) {
    $return[] = $row;
  }
  return($return);

```