Home:ALL Converter>Json encode and special characters

Json encode and special characters

Ask Time:2015-04-17T23:14:13         Author:Abc

Json Formatter

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

Author:Abc,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/29703124/json-encode-and-special-characters
yy