Are there any best practices for including attendees in iCalendar events using PHP functions?

When including attendees in iCalendar events using PHP functions, it is important to follow the iCalendar format specifications for attendees. This typically involves adding an ATTENDEE property with the email address of the attendee. Additionally, it is recommended to include the attendee's name using the CN parameter within the property.

// Define attendee information
$attendeeEmail = 'john.doe@example.com';
$attendeeName = 'John Doe';

// Add attendee to iCalendar event
$icalEvent .= "ATTENDEE;CN=$attendeeName:mailto:$attendeeEmail\r\n";