How can the session cookie be configured using session_set_cookie_params() in PHP?

To configure the session cookie using session_set_cookie_params() in PHP, you can set parameters such as the cookie lifetime, path, domain, secure, and httponly. This function allows you to customize the behavior of the session cookie according to your requirements.

// Set session cookie parameters
session_set_cookie_params(3600, '/', '.example.com', true, true);

// Start the session
session_start();