My code was working fine when i was getting the data from a table without special characters, but when i tried to use the same code, on a different table, and Json returned me null values, how can i fix that, and output the data with special characters?
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("mydb", $con);
$result = mysql_query("SELECT * FROM dates");
while ($row = mysql_fetch_assoc($result))
{
$output[] = $row;
}
$users = json_encode(array(
"contacts" => $output
));
mysql_close($con);
Thanks