How can PHP be used to change the date format from "2004-05-22" to "22.05.2004"?

To change the date format from "2004-05-22" to "22.05.2004" in PHP, you can use the `strtotime()` function to convert the date string into a Unix timestamp, and then use the `date()` function to format the timestamp into the desired format.

$dateString = "2004-05-22";
$newDateFormat = date("d.m.Y", strtotime($dateString));
echo $newDateFormat;