我收到这样的 API 响应:
"alert": "success",
"content": [
{
"id": "HIDDEN",
"answers": {
"3": {
"text": "Name",
"type": "control_textbox",
"answer": "Tim"
},
"4": {
"text": "Telephone Number",
"type": "control_textbox",
"answer": "Sample"
}
}
例如,虽然我可以获得“警报”,但我不确定如何获得每个“TEXT”响应
我试过这个:
foreach ($submissions as $submissions) {
print "<p class='list'><b>" . $submissions["alert"] . "</b><br>"; $answer['text'];
}
为了清楚起见,上面的代码返回的是 ALERT 内容,而不是 TEXT。我知道这是因为它在一个数组中,但我无法返回它,我也无法在 JotForm 中找到与此类似的任何响应,或者通过阅读 API 找到答案!