I have a Jquery code getting data from ajax call.
$.ajax({
type: 'GET',
url: 'php/upd_dashboard.php',
data: {'name': 'GET_ANUAL_TOTAL_OBJECTIF'},
success: function(data){
list_total_objectif=data;
},
dataType: 'JSON',
async: false
});
the file upd_dashboard.php, get data from MySql database, and return json result.
echo json_encode($result);
I have no problem when executing this code in localhost, but when I deploy the site I can't get the result of json_encode. by inspecting that in Chrome, I get a character '\ufeff' at the beginning of the json result !!
Is it a problem of encoding? Regards, Hamza.