I have a form that submits to codeigniter email class and sends emails to my clients. I have a simple to
input field.
<input type="text" name="to" class="form-control">
I want to be able to type multiple email addresses into this one field and send emails to them all at once. This is pretty simple in codeigniter I just need to get the emails into an array and placed in the to
param in codeigniter.
So I want to be able to type something like the below into the field, submit it, break the post data into an array with the breaking point being ,
or a comma.
someone@me.com, yournamehere@example.com, myself@myowndomain.com
The above would need to go into an array such as this:
$list = array(
'someone@me.com',
'yournamehere@example.com',
'myself@myowndomain.com,
);
My real question is, what is the fastest and cleanest way to break the regular post data from the input field to
into an array by using ,
a comma as the breaking point.