数组看起来像
$arr = Array
(
[0] => Array
(
[TEXT] => A
)
[1] => Array
(
[TEXT] => B
)
[2] => Array
(
[TEXT] => C
)
)
我正在尝试像这样输出数组
$arr = Array
(
[TEXT] => ABC
)
我尝试使用数组内爆,但仍然没有运气任何想法?感谢
答案 0 :(得分:0)
$arr = [
['TEXT' => 'A'],
['TEXT' => 'B'],
['TEXT' => 'C'],
];
$new_arr = [];
$concat = '';
foreach ($arr as $key => $value) {
$concat .= $value['TEXT'];
}
$new_arr['TEXT'] = $concat;
var_dump($new_arr);