0
点赞
收藏
分享

微信扫一扫

php json encode - 数组键不输出为字符串

古月无语 2022-10-31 阅读 134


  So I have a php array like this:

  I would like to output this array in json_encoded form with the array keys as object names(?).

  When I the array I get this:

  The trouble with this is that the array keys ("name" and "data") are output as strings. I need them to be objects. I.e. without the quotes around them.

  EDIT:

  The purpose is this is to build and use a php array with highcharts. As can be seen in the source of this chart the data is passed in that way:

  Is this json or another way of forming javascript objects?

举报

相关推荐

0 条评论