<?php
$insertData = [
[
'test' => '1',
'test1' => '2',
],
[
'test' => '3',
'test1' => '4',
]
];
$values = [];
foreach ($insertData as $row) {
array_push($values, ...array_values($row));
}
var_dump(
($values),
);
- Output for 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
- array(4) {
[0]=>
string(1) "1"
[1]=>
string(1) "2"
[2]=>
string(1) "3"
[3]=>
string(1) "4"
}
preferences:
50.63 ms | 406 KiB | 5 Q