Passing element through array and back
Posted: Tue Jan 23, 2007 4:05 am
arborint | Please use
arborint | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
We're trying to get the elements from an array and remove the extra stuff, only keeping the email address . Pass through the registration
then put these back in another array...
It is for a invite your friend code where the user enter his friend email manually.
Thank you so much for your insight. Not sure what we're doing wrong.
JCode: Select all
/// manual email
$emcontactz= $_POST['emailz'];
$emcontactz = substr($emcontactz, 0, 450); $rawemail = explode(",", $emcontactz); $numi = substr_count($rawemail);
$o = 0;
while($o<=$numi) {
$rawemail[$o]=trim($rawemail[$o]);
if(ereg("^[^@ ]+@[^@ ]+\.[^@ \.]+$",$rawemail[$o]))
$rawemailValid[]=$rawemail[($o)];
$o++;arborint | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]