$app->get('/partner_push/:event_id', function($event_id) {
$response = array();
$result = array();
$db = new DbHandler();
// fetching all user tasks
$result[0] = $db->getevent_partner_pushdata($event_id);
$result[1] = $db->getevent_organiser_pushdata($event_id);
//echo '<pre>';print_r($result);die;
$response["error"] = false;
$response["push"] = array();
for($i=0;$i<count($result);$i++){
if(!empty($result[$i])){
// pushing single chat room into array
while ($fetch_room = $result[$i]->fetch_assoc()) {
$tmp = array();
//print_r($fetch_room);die;
if($i==0){
$tmp["push_from"]= "partner";
$tmp["pushID"] = $fetch_room["pushID"];
$tmp["pushEventID"] = $fetch_room["pushEventID"];
$tmp["pushpartnerID"] = $fetch_room["pushpartnerID"];
$tmp["push_message"] = utf8_encode($fetch_room["description"]);
$tmp["partner_name"] = utf8_encode($fetch_room["establishment"]);
$tmp["time_stamp"] = $fetch_room["created"];
} else{
$tmp["push_from"]= "organiser";
$tmp["pushID"] = $fetch_room["orgpushid"];
$tmp["push_message"] = utf8_encode($fetch_room["des"]);
$tmp["pushEventID"] = $fetch_room["orgEventID"];
$tmp["pushpartnerID"] = $fetch_room["orgID"];
if(!$fetch_room["artwork"]=="" || !$fetch_room["artwork"]==null)
{
$url = "https://*********/pushImg/";
$tmp["attachment"] = $url.$fetch_room["artwork"];
$tmp["attachmentname"] = $fetch_room["artwork"];
}
$tmp["organiser_name"] = utf8_encode($fetch_room["firstname"]." ".$fetch_room["lastname"]);
$tmp["time_stamp"] = $fetch_room["created"];
}
array_push($response["push"], $tmp);
}
}
}
echoRespnse(200, $response);
});
В базе данных изменен тип сортировки столбца («описание») на «utf8-general-ci».Многоязычные данные хранятся в базе данных, но при чтении отображаются как «??????».В веб-приложении отображаются многоязычные данные.но при поиске в мобильном и почтальоне данные отображаются как «????».Как решить это?любезно предлагаю