I'm getting this error on the following line of my PHP Script which is responsible for executing the mysqli_query. I'm not sure why it is occuring there :
syntax error, unexpected T_VARIABLE, expecting ']'
<?php
$response = array("error" => FALSE);
if (isset($_POST['city']) && isset($_POST['offset']) != '') {
 $city= $_POST['city'];
 $offset = $_POST['offset];
 $conn=mysqli_connect("****.com", "***", "***","****");
$get_images= mysqli_query($conn,"SELECT user_id, image, longitude, latitude, city, geo_name_id, description, score, Categories FROM images WHERE geo_name_id = '$city' LIMIT 10 OFFSET '$offset'");
 $myArray = array();
$returnArray = array();
while($row = $get_images->fetch_array())
{
 $myArray["user_id"] = $row["user_id"];
 $myArray["image"] = $row["image"];
 $myArray["longitude"] = $row["longitude"];
 $myArray["latitude"] = $row["latitude"];
 $myArray["city"] = $row["city"];
 $myArray["geo_name_id"] = $row["geo_name_id"];
 $myArray["description"] = $row["description"];
 $myArray["score"] = $row["score"];
 $myArray["Categories"] = $row["Categories"];
 $returnArray[] = $myArray;
}
echo json_encode($returnArray);
  }   
  ?>        
I don't really see where it can expect a ] here...
 
    