I am sorry but I am stuck at the moment.
How can I read the individual values of this array ? With foreach?
Array
(
[30706] => Array
(
[name] => 30706
[model] => al553
)
)
I am sorry but I am stuck at the moment.
How can I read the individual values of this array ? With foreach?
Array
(
[30706] => Array
(
[name] => 30706
[model] => al553
)
)
Assuming you connect using PDO
$sql = 'INSERT into table (`name`, `model`) VALUES(:name, :model)';
$stmt = $db->prepare($sql);
foreach ($arr as $data) {
$stmt->execute([':name' => $data['name'], ':model' => $data['model']])
}