执笔画卿颜 丶2020-10-14 01:07:58
if ($type == 'insert') { $fields = $values = []; foreach ($data as $key => $value) { // 键值存入$fields $fields[] = $key; // 值存入$values; $values[] = $value; } }
二娃你先上2020-10-12 11:38:24
The foreach you wrote is $key=>$value, and $val is used for assignment below. This is definitely wrong.