Zend_JSON:Encode messing up - why?

前端 未结 3 2009
囚心锁ツ
囚心锁ツ 2021-02-13 02:50

My Zend_Json is messing up in encoding an object here. I\'m encoding an associative array which has two elements: Element one is another associative array while element 2 is an

3条回答
  •  悲哀的现实
    2021-02-13 03:31

    This usually happens if you use substr() or use $somestring[0] on a utf-8 string which has multibyte letters. Use mb_ prefixed functions to edit this sort of data, then you will not have problem with json_encode()

提交回复
热议问题