Cursos en línea para aquellos involucrados en el cuidado y apoyo de individuos con condiciones de desarrollo.
Read Our Policies
0) { while($row = mysqli_fetch_assoc($result)) { $name = $row["name"]; $category = $row["program"]; $instructor = $row["instructor"]; $date = $row["datestarted"]; $givenDate = new DateTime($date); // Get the current date $today = new DateTime(); // Calculate the difference in days $diff = $today->diff($givenDate); $daysUntilTraining = $diff->days; // Convert to a custom format $prettyDate = $givenDate->format('l jS \o\f F Y'); // Print the formatted date $days = 'The training is scheduled for ' . $prettyDate; // Print the number of days until the training if ($daysUntilTraining == 0) { $days = 'The training is today!'; } elseif ($daysUntilTraining == 1) { $days = 'The training is tomorrow!'; } else { $days = 'There are ' .$daysUntilTraining .' days until the training takes place'; } $time = $row["timestarted"]; $duration = $row["timeended"]; $startTime = (new DateTime($time))->format('H:i'); $durationTime = (new DateTime($duration))->format('H:i'); $location = $row["placeorschool"]; $summary = $row["z1"]; echo ""; } } else { echo "No courses available!"; } mysqli_close($link); ?>