foreach ($_POST['schedule_date'] as $key => $row) {
$query = $db->prepare("INSERT INTO schedule SET date = ?, time = ?, location_title = ?, location_address = ?, item_id = ?");
$query->execute(array($_POST['schedule_date'][$key], $_POST['schedule_time'][$key], $_POST['schedule_place'][$key], $_POST['schedule_address'][$key], $last_id));
}