Degree '°' character not displaying in php json_encode function, how to display this?

后端 未结 4 1444
臣服心动
臣服心动 2021-02-19 21:59

I pass php array like

[sit_latitude] => 20° 23.298\' N

inside json_encode(); and output is like,

  {\"sit_latitude\":null}
<         


        
4条回答
  •  逝去的感伤
    2021-02-19 22:54

    JSON and escaping characters - this post may help you.

    Just pass degree as \u00f8C and then decode it with js.

提交回复
热议问题