Home  >  Article  >  Backend Development  >  php json_encode怪问题

php json_encode怪问题

WBOY
WBOYOriginal
2016-06-23 14:32:48833browse

简介:这是php json_encode怪问题的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。

class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=354636' scrolling='no'>

  json_encode 只支持utf-8格式这个就不多说了

$array = array (             [0] => array ( [sale_unit_detail_id] => 13 [price] => 740000 [geometric_lat] => 51.50348620 [geometric_lng] =>-0.01710900  )             [1] => Array ( [sale_unit_detail_id] => 27 [price] => 740000 [geometric_lat] => 51.50348620 [geometric_lng] => -0.01710900  )           );

  上面的php数组json_encode 之后通常会转化php数组会转化为形如[[...][...]] 的格式,但是今天碰到一个怪问题,当我的数组长度达到142的时候 给我转化为了形如

  {'0' :{..},'1':{...}......}的格式很奇怪,json_encode 一个神奇的函数

  http://xiebiji.com/2008/12/json_encode/ 这篇博客也有类似相关的介绍,大家可以去看一看!

爱J2EE关注Java迈克尔杰克逊视频站JSON在线工具

http://biancheng.dnbcw.info/php/354636.html pageNo:2
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP发送邮件Next article:PHP常用工具