foreach ($_POST['schedule'] as $row) {
if (isset($row['date'], $row['time'], $row['place'], $row['address'])) {
$query = $db->prepare("INSERT INTO schedule SET date = ?, time = ?, location_title = ?, location_address = ?, item_id = ?");
$query->execute(array($row['date'], $row['time'], $row['place'], $row['address'], $last_id));
}
}
Schedule(optional)