All, I have a php file which runs a MYSQL query and places the result in an array. The table has several fields, one has the characters '-' and '%' as part of a varchar string. When I pass this back in a JSON array it simply dies. Here are the code sections..
PHP file
// fetch merit guidelines
$meritGuideline = array();
$sql = "SELECT smg.id, year, ea.rating, ratioUpper, ratioLower, guideline, guidelineNum FROM spot_merit_guide smg JOIN epm_annual ea ON ea.id = smg.rating WHERE year = '$spotYear'";
$query = mysqli_query($con, $sql);
while ($row = mysqli_fetch_assoc($query)) {
$meritGuideline[] = $row;
}
mysqli_free_result($query);
Then I return it with this
echo json_encode(array('meritGuideline' => $meritGuideline));
The mysql table field guideline contains the string 0 - 4%.