除了通过猜测和检查之外还有其他方法吗?
举一个具体的例子,我的JSON对象是
{'action': 'member_update', 'formStuff' : postData}
postData
就像
[{"name":"fullname","value":"John Skeet"},{"name":"title","value":"Stack Overflow Poster"},{"name":"bio","value":"blah blah blah "},{"name":"sord","value":"3"},{"name":"memberAction","value":"add"}]
和postData
对象,无论它在PHP领域变成什么,都是
`$_POST['formStuff']`.
我想知道如何获取值"John Skeet"
,"Stack Overflow Poster"
等等。我已经尝试过,例如,$_POST['formStuff']['fullname']
和$ _POST['formStuff']->fullname
,两者都不起作用。
哦,是的,我用count($_POST['formStuff'])
测试了对象长度为5,如果这有助于缩小它lol