PHP Mail, CC Field

In PHP, the "CC" field can be included in an email using the "mail" function by adding a "CC" header to the additional headers parameter. The format for the CC header should be "CC: email1, email2, email3" where "email1, email2, email3" are the email addresses of the recipients you want to CC.

Example:

<?php

$to = "recipient@example.com";
$subject = "Test email";
$message = "This is a test email.";
$headers = "From: sender@example.com\r\n";
$headers .= "CC: copy1@example.com, copy2@example.com\r\n";

mail($to, $subject, $message, $headers);

In this example, "copy1@example.com" and "copy2@example.com" will receive a copy of the email.