【发布时间】:2011-11-10 22:33:24
【问题描述】:
我有一些来自查询的数字,我必须使用 json_encode 函数来表示。 一切正常,但输出看起来像这样
{ "label": "man", "data":[["0","1.13"], ["1","1.38"], ["2","1.87"], ["3","1.12"], ["4","1.28"]]}
所以我认为问题在于所有数字都存储为字符串。 有没有把所有元素转换成数字的功能?
【问题讨论】:
-
"so I think that the problem is that all the numbers are stored as string."什么问题?
标签: php arrays string numbers json