这里是我的代码:将两个或多个数组插入到“最终数组”中?
<?php
//header code to define as json and if $_GET statement...
$JSONArrayA[$variableA] = array('id' => $idA, 'test' => $testVariableA);
$JSONArrayB[$variableB] = array('id' => $idB, 'test' => $testVariableB);
//current code resulting in ["ArrayArray"]
$FinalJSONArray[] = $JSONArrayA . $JSONArrayB;
echo json_encode($FinalJSONArray);
?>
我的问题:如何让我的阵列包含两个或多个阵列?任何帮助赞赏。
什么不只有帮助你需要....你也有改善使用简单的引号''''[array_merge](http://php.net/manual/en/function.array-merge.php)来看看如何合并数组 – Baba
哈哈,对不起,我打字很快。我现在编辑。 – 1789040
'array_merge'用于合并数组 – Reflective