I've got an Json output with three values.

```
{"contacts":[{"id":"1","name":"one"},{"id":"2","name":"two"},{"id":"3","name":"three"}]}

```

And I would like to remove the row with the ID equal to 2, and output this:

```
 {"contacts":[{"id":"1","name":"one"},{"id":"3","name":"three"}]}

```

My code

```
$output = array();
while($row = mysqli_fetch_assoc($result))
  {
    $output[] = $row;
  }

    $json = json_encode(array(
    "contacts" => $output
));

    echo strip_tags($json);

```

How can I do that? Thanks