Guys dripping screw and found this
function normJsonStr($str){ $str = preg_replace_callback('/\\\\u([a-f0-9]{4})/i', create_function('$m', 'return chr(hexdec($m[1])-1072+224);'), $str); return iconv('cp1251', 'utf-8', $str); } How can I add this to my script?
$sql="SELECT * FROM spacecrafttb WHERE Propellant LIKE '%$name%'"; $query=mysqli_query($con,$sql); if($query) { while($row=mysqli_fetch_array($query)) { $data[]=$row; } print(json_encode($data)); }else { echo('Not Found '); } mysqli_close($con); To display Cyrillic. Help someone not difficult for the first time I work with php . The JSON_UNESCAPED_UNICODE function JSON_UNESCAPED_UNICODE not work as I have php 5.3 I would be grateful!
normJsonStr($str), is this a question? - koks_rs$row['elem'] = normJsonStr($row['elem'])then add $ row to $ data - koks_rs