I want to get a JSON output like http://api.androidhive.info/json/movies.json and I wrote this code in PHP:
<?php
    $con=mysqli_connect("localhost","root","","ebrahim");
    $sql="SELECT * FROM movie";
    $result=mysqli_query($con,$sql);
    $response= array();
    while($row=mysqli_fetch_array($result,MYSQLI_NUM)){
        $product = array();
        $product["title"]=$row[1];
        $product["image"]=$row[2];
        $product["rating"]=$row[3]; 
        $product["releaseyear"]=$row[4]; 
        $product["genre"]=$row[5];   
        array_push($response,$product);
    }
    echo json_encode($response);
?>
but my output is like this : enter image description here
Please help me to make a standard JSON.



header('Content-Type: application/json');