i've got a normal text field.. <input type="text" name="bla" size="25">
and in that text field, i want the user to type in however many email addresses they wish seperated by commas. me@you.net, foo@bar.net, you@me.net, etc..
i want to take these emails and give them each their own assigned variable.
i can't figure out how to use ereg_replace on these since i never really know how many email addresses will be typed in.. how can i do this? i'm driving myself mad.
Hi!! I think that it's a better idea to do this:
$emails_array = explode(',', $email_field);
and next you can check the number of emails this way:
$cant = sizeof($emails_array);
or
$cant = array_count($emails_array);
HTH
inK
Furthermore, you can do this assign each to a variable.
for ($i=0;$i<count($emails_array);$i++) { $email . $i = $emails_array[$i]; }