How can timestamps be properly formatted for display in PHP dropdown menus?

When displaying timestamps in PHP dropdown menus, it is important to properly format the timestamps into a human-readable date format. This can be achieved using the date() function in PHP, which allows you to specify the desired date format. By using the date() function with the appropriate format parameters, you can display timestamps in a more user-friendly manner in dropdown menus.

// Assuming $timestamp is the timestamp value
$formatted_date = date('Y-m-d H:i:s', $timestamp);
echo '<option value="' . $timestamp . '">' . $formatted_date . '</option>';