我正在使用 PHP 并尝试创建一个看起来像这样的数组:
{
"aps" : {
"alert" : "Hey"
},
"custom_control" : {
"type" : "topic_comment",
"object":{
"topic_id":"123",
"topic_section":"test"
"plan_id":"456"
}
}
}
到目前为止,我有类似的东西
$message = array('aps'=>array('alert'=>$some_variable));
但我很困惑之后如何将“custom_control”的值放入这个数组中。谁能告诉我如何从我现有的php中做到这一点?
谢谢!