Php Script empty response get data
<p>I'm trying to fix up an old script which used to always work but now gives an empty response; I have no idea why. I have checked that the while loop is entered, <code>num_of_rows = 100</code>, yet I don't get any response. </p>

<pre><code>&lt;?php

$response = array();


$conn=mysqli_connect("localhost", "***", "***","***");


// get all gamelists from gamelists table
 $result = mysqli_query($conn,"SELECT * FROM `abcd`");


// check for empty result
if (mysqli_num_rows($result) &gt; 0) {


$response["gamelist"] = array();

while ($row = $result-&gt;fetch_array()) {
    // temp user array

    $gamelist = array();
    $gamelist["id"] = $row["id"];
    $gamelist["ques"] = $row["ques"];
    $gamelist["odp_a"] = $row["odp_a"];
    $gamelist["odp_b"] = $row["odp_b"];
    $gamelist["odp_c"] = $row["odp_c"];
    $gamelist["odp_d"] = $row["odp_d"];
    $gamelist["comment"] = $row["comment"];
    $gamelist["correctanswer"] = $row["correctanswer"];
    $gamelist["commentfirst"] = $row["commentfirst"];





    // push single gamelist into final response array

    array_push($response["gamelist"], $gamelist);
}
// success
$response["success"] = 1;

// echoing JSON response
echo json_encode($response);
 } else {
// no gamelists found
  $response["success"] = 0;
$response["message"] = "No gamelists found";

// echo no users JSON
echo json_encode($response);
 }
?&gt;
</code></pre>

<p><a href="https://i.stack.imgur.com/RA9Rq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RA9Rq.png" alt="enter image description here"></a></p>

<p>Output : </p>

<pre><code>1234444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
</code></pre>