$json = array('name' => 'Руслан', 'last_name' => 'Садыхов'); return json_encode($json); 

Similar symbols are returned instead of the first and last names: \ u0420 \ u0443 \ u0441 \ u043b \ u0430 \ u043d

How can this be fixed?

  • json_decode - KryDos
  • @KryDos, please write the code. Otherwise, json_decode ($ json); gives emptiness. - ModaL
  • @ModaL, wrote - KryDos
  • \u0420 - Р , \u0443 - у , etc. - alexlz
  • @alexlz, I understood: D It will be necessary, I thought there was a way easier) - ModaL

2 answers 2

Cyrillic in json_encode

    I do not know how old the posts are, but who can use this one: \u0420\u0443\u0441\u043b\u0430\u043d json encoding, it should be like this, in jquery we do var result= JSON.parse('\u0420\u0443\...'); we get an array of characters

    • 1) This is not jquery; 2) It does not work - andreymal