<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="right_columm_for_button">
<a href="#callback_delete_note" class="button_del_item_note"
onclick="document.getElementById('id_textarea_zametka').value=this.dataset.delete_zametka"
data-delete_id="231"
data-delete_zagolovok="Самокат Электрический"
data-delete_zametka="Новый Электро
самокат, который
умеет ездить по земле!"
>click</a>
</div>
<form action="add_or_edit.php" id="id_form_edit_note" name="name_form_edit_options_note_js" method="post" class="window_OPTIONS_theme" enctype="multipart/form-data">
<input name="input_zagolovok" id="id_zagolovok" disabled class="DE_VISIBLE_class_input_zagolovok_main" type="text">
<textarea rows="20" cols="10" class="DE_VISIBLE_textarea_zametka_main" disabled id="id_textarea_zametka" name="input_zametka"></textarea>
</form>
</body>
</html>
$data = [
['John','Doe', 22],
['Jane','Roe', 19],
];
$stmt = $pdo->prepare("INSERT INTO users (name, surname, age) VALUES (?,?,?)");
try {
$pdo->beginTransaction();
foreach ($data as $row)
{
$stmt->execute($row);
}
$pdo->commit();
}catch (Exception $e){
$pdo->rollback();
throw $e;
}
Сравните вывод