Not able to Pass Array Data : I am Trying to create an array in $data but not happening .. I am Using This code to make a Day Wise Sale Chart .... 
Kinldy Help Me

```php
 $data = array();
for($i=0; $i<=10; $i++){
    
 $billdate = date('d-m-Y',strtotime("-$i day"));
$sqlQuery = "select sum(amount),bill_date from msr_bills WHERE bill_date='$billdate' ";
     $result = mysqli_query($con,$sqlQuery);

    $fetchamount = mysqli_fetch_row($result);
 $sum = $fetchamount[0];
    
    $data =  new \stdClass();
 $data->bill_date = $billdate;
    $data->amount = $sum;
     $report_JSON = json_encode($data);

 echo  $report_JSON.",";

}
```