User submits form that contains field called “inDomain” that contains “[email][email protected][email][email protected]
I want to do a loop that checks the submitted email address (which I can do in Perl, but PHP is just different enough that I need some help.)
Here is what is in my php file:
$Email = $_GET[“inDomain”];
$ckEmail = array(split(/,/,$Email));
foreach ($ckEmail as $vEmail) {
echo “something” or print $vEmail
}
I’m thinking I need to split the list based on commas as I would in Perl – is this correct? All of the examples I can find show you how to build an array first such as $bob = array(‘this’, ‘that’, ‘the other’)…
Here’s what the same thing looks like in Perl:
my $domain = param(‘domain’);
@ckEmail = split(/,/,$domain); #split emails based on commas
foreach $emaddr (@ckEmail) {
print something or print $emaddr or whatever
}