我正在尝试使用PHP构建以下数组,以便将卡片发送至Google Hangouts聊天Webhook。
{
"cards": [
{
"sections": [
{
"widgets": [
{
"keyValue": {
"topLabel": "Order No.",
"content": "12345",
"contentMultiline": "false",
"bottomLabel": "Delayed",
"onClick": {
"openLink": {
"url": ""
}
},
"icon": "TRAIN",
"button": {
"textButton": {
"text": "VISIT WEBSITE",
"onClick": {
"openLink": {
"url": ""
}
}
}
}
}
}
]
}
]
}
]
}
这是我到过的地方,但似乎没有用。.
$card["cards"]["sections"]["widgets"]["keyValue"]["topLabel"] = "Issue No";
$card["cards"]["sections"]["widgets"]["keyValue"]["topLabel"] = $_GET["issueid"];
$card["cards"]["sections"]["widgets"]["keyValue"]["contentMultiline"] = false;
任何帮助都将是惊人的,只是简要概述如何在PHP中构建上述数组。
谢谢!
答案 0 :(得分:1)
已解决。
my %v = ReadIni( $*PROGRAM.parent.add('ReadConfig.ini') );
这将覆盖我认为的那个,我认为第二个索引中的$card["cards"]["sections"]["widgets"]["keyValue"]["topLabel"] = $_GET["issueid"];
应该是["topLabel"]
?
感谢@devpro