hey there im a little stuck with getting data from my phpmyadmin and displaying it as json this is my php so far
<?php
$user = '';
$password = '';
$con=mysqli_connect("localhost",$user,$password,"tugutept_jumputi");
if (mysqli_connect_errno())
  {
   echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
$query = 'SELECT * FROM chartable';
$stm = mysqli_query($con,$query);
$data_array = array();
$count = 0;
while($r = mysqli_fetch_row($stm)){
    $data_array[$count] = $r;
    $count= $count +1;
}
echo json_encode($data_array);
mysqli_close($con);
?>
which displays this  when i want it looking like this
when i want it looking like this 
[
  {
    "ID": "000001"
    "Name": "[The Saiyan who grew up on Earth] Son Goku",
    "Portrait": "BaseGoku.png",
    "Series": "Dragon Ball",
    "MaxRarity": "6 start",
    "Type": "Blue",
    "Class": "Tank",
    "Era": "1980",
    "Release Date": "2018-03-28",
    "Farmable": "0",
    "Method": "Trade Medal Store"
  }
]
i want to take each row from the table and put it in an array but i keep getting the whole table in one array, as you can see im a little stumped any help is welcome thanks
 
     
    