What is the "expire" command to delete a cookie when the browser window is closed in PHP?

To delete a cookie when the browser window is closed in PHP, you can set the cookie's expiration time to 0, which will make the cookie expire when the browser is closed. This ensures that the cookie is not stored beyond the current browsing session.

// Set the cookie with an expiration time of 0
setcookie("cookie_name", "cookie_value", 0);