if I wanted to find any items in an array starting with [ and ending with ] how would I go about it? I amm building an email queue processor and I want to be able to place email address or distribution list names. eg if I had a list.. chris@domain.com, john@domain.com, [maillist_1]
$email_to = "chris@domain.com, john@domain.com, [maillist_1]";
$email_to = explode(",", $email_to);
foreach($email_to as $to_emails)
{
// First Check if its a distribution list
if($dist == "yes")
{
// get the list and split them.
$emails_to[] = $to_emails;
}
else
{
$emails_to[] = $to_emails;
}
}