如何将接收到的数组值拆分成新数组?
因此:
[["+","+","+"],["-","+","+"],["*","+","+"],["\/","+","+"],
到此:
["+"],["+"],["+"],["-"],["+"],["+"],["*"],["+"],["+"],
有人可以帮助我吗?
答案 0 :(得分:1)
通过循环来展平你的数组
$aFlattened = array();
foreach($aOriginalArray AS $aOperators){
$aFlattened = array_merge($aFlattened, $aOperators);
}