[![enter image description here](https://i.stack.imgur.com/UyQuC.png)](https://i.stack.imgur.com/UyQuC.png)

This is my table and I would like to PHP to generate json like this

```
{
  "1":
  {
    "start_time":"03:27:43","end_time":"06:27:43"
  },
  "2":
  {
    "start_time":"03:27:43","end_time":"06:27:43"
  },
  "3":
  {
    "start_time":"03:27:43","end_time":"06:27:43"
  },
  "4":
  {
    "start_time":"03:27:43","end_time":"06:27:43"
  },
  "5":
  {
    "start_time":"03:27:43","end_time":"06:27:43"
  },
  "6":
  {
    "start_time":"03:27:43","end_time":"06:27:43"
  }
}

```

Not being able to put the subtopics in PHP Array, can you please help