How can the explode() function be utilized to manipulate date strings in PHP?
To manipulate date strings in PHP using the explode() function, you can split the date string into an array of its components (e.g., day, month, year) based on a specified delimiter (e.g., "/"). This allows you to access and manipulate individual date components as needed.
$dateString = "10/25/2021";
$dateArray = explode("/", $dateString);
$day = $dateArray[1];
$month = $dateArray[0];
$year = $dateArray[2];
echo "Day: " . $day . "<br>";
echo "Month: " . $month . "<br>";
echo "Year: " . $year;