$book) { # code... $query = "select nsyname from {$prefix}_pagematch where nsyid = ? "; $Fetch_nsy_book[$key]['name'] = PDO_FetchRow($query, array($book["nsyid"]))['nsyname']; $Fetch_nsy_book[$key]['type'] = $prefix; } $result["data"] = json_encode($Fetch_nsy_book, JSON_UNESCAPED_UNICODE); } else { $result["error"] = "error: in table book_match"; } echo json_encode($result, JSON_UNESCAPED_UNICODE);