0

如何将接收到的数组值拆分为新数组?

所以从这里:

[["+","+","+"],["-","+","+"],["*","+","+"],["\/","+","+"],

对此:

["+"],["+"],["+"],["-"],["+"],["+"],["*"],["+"],["+"],

有人能帮我吗?

4

1 回答 1

1

通过循环来展平你的数组

$aFlattened = array();
foreach($aOriginalArray AS $aOperators){
   $aFlattened = array_merge($aFlattened, $aOperators);
}
于 2013-10-20T17:51:13.130 回答