exec('SET NAMES utf8'); //$db->exec("SET time_zone = '+00:00'"); header("Content-type: text/javascript"); ?> /*function trt(key) { var val=g_translations[key]; if(val===undefined) { if(key===undefined) return ''; else return key.replace(/_/g, ' '); }else return val; }*/ var g_translations = { '':'' query($sql); }catch (Exception $e) { echo $e->getMessage(); } if($res!=NULL && $res->rowCount()>0) { while ($row = $res->fetch(PDO::FETCH_NUM)) { $identifier = str_replace(" ", "_", $row[1]); $identifier = str_replace("\"", "_", $identifier); $identifier = str_replace("'", "_", $identifier); $identifier = str_replace("!", "_", $identifier); $identifier = str_replace("%", "_", $identifier); $identifier = str_replace("(", "_", $identifier); $identifier = str_replace(")", "_", $identifier); $identifier = str_replace("/", "_", $identifier); $identifier = str_replace(".", "_", $identifier); $row[2] = str_replace("'", "\'", $row[2]); echo " ,".$identifier.": '".trim($row[2])."'\n"; } } ?> };