i need to mix up two arrays...
on is phone #'s generated from txt
the other is email adresses.. (I need to sms/email message phone numbers to all carriers since i don't know which phone service they have...)
PHP Code:
// read the list of emails from the file.
$email_list = file("../_private/maillist.txt");
// count how many emails there are.
$total_emails = count($email_list);
// go through the list and trim off the newline character.
for ($counter=0; $counter<$total_emails; $counter++) {
$email_list[$counter] = trim($email_list[$counter]);
}
// implode the list into a single variable, put commas in, apply as $to value.
$sms = array("@message.alltel.com","bellsouth.cl","csouth1.com","@mobile.celloneusa.com","@mycellone.com","@mobile.mycingular.com","@imcingular.com","@mobile.mycingular.com","mymetropcs.com","@messaging.nextel.com","messaging.sprintpcs.com","@sprintpcs.com","@tmomail.net","@tmail.com","@myairmail.com","@vmobl.com");
//if ( mail($to,$subject,$message) ) {
// echo "The email has been sent!";
// } else {
// echo "The email has failed!";
// }
how do i mix $sms with $email_list so each number gets added to EACH E-mail...
example:
$poo = [ 1 , 2 , 3 ]
$ass = [ a , b , c ]
now mix them and i need
****$IWANT = [ 1a , 1b, 1c , 2a , 2b , 2c, 3a , 3b , 3c ]***
Last edited by guyjusthere; 09-02-2007 at 10:18 PM.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
$new_array = array(); // initialize new empty array
foreach($array_1 as $value_1)
{
foreach($array_2 as $value_2)
{
$new_array[] = $value_1 . $value_2;
}
}
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
damn i was so close to doing it myself.. THANKS.. is there any way to prevent the email to send the return address as the header... and if im e-mailing ALOT of people at the same time, should i stray from the mailto script?
Bookmarks