How can I efficiently send an email to multiple recipients in PHP?
When sending an email to multiple recipients in PHP, you can use the `mail()` function with a comma-separated list of email addresses in the `to` parameter. This allows you to send a single email to multiple recipients efficiently.
$to = 'recipient1@example.com, recipient2@example.com, recipient3@example.com';
$subject = 'Hello from PHP!';
$message = 'This is a test email sent to multiple recipients.';
$headers = 'From: sender@example.com';
mail($to, $subject, $message, $headers);