Im having a problem I did a research and common problem is lack of semi colon but I am sure that there's nothing wrong in my code please check this out.
<?php
require 'connection.php';
$query = "select id from `account_info`";
$res = mysqli_query($connect,$query);
$result = array();
while($row = mysqli_fetch_array($res)){
array_push($result,
array('id'=>$row[0]
));
}
echo json_encode(array("result"=>$result));
mysqli_close($connect);
?>
connection.php
<?php
define('hostname','mysql.hostinger.ph');
define('user','********_mftis');
define('password','********');
define('databaseName','u366906409_mftis');
$connect = mysqli_connect(hostname,user,password,databaseName);
?>