title: How to unset all the mail headers by array key cc and bcc in a loop in PHP?
body: <p>Below is how I tried to unset all the mail header array by cc and bcc. </p>
  
  <pre><code>unset(
    $message['cc'], $message['Cc'], $message['CC'],
    $message['headers']['cc'], $message['headers']['Cc'], $message['headers']['CC'],
    $message['params']['headers']['cc'], $message['params']['headers']['Cc'], $message['params']['headers']['CC'],
    $message['bcc'], $message['Bcc'], $message['BCC'],
    $message['headers']['bcc'], $message['headers']['Bcc'], $message['headers']['BCC'],
    $message['params']['headers']['bcc'], $message['params']['headers']['Bcc'], $message['params']['headers']['BCC']
  );
  </code></pre>
  
  <p>There are <code>cc</code>, <code>Ccc</code>, <code>CCC</code>, <code>bcc</code>, <code>Bcc</code> and <code>BCC</code>. I know the above solution is not efficient. How can I replace the above code with a shorter code using for-loop?</p>