Filtering mails
Posted: Sun Mar 29, 2009 6:19 pm
i have a text file with text on it and emails, how can i gather only emails from a text file and echo those.
email is in this mode:
email.com can be: hotmail,yahoo,msn etc..
i was using but it doesnt work:
email is in this mode:
Code: Select all
email: email@email.comi was using but it doesnt work:
Code: Select all
$file = 'datafile.txt';
$lines = file($file);
foreach ($lines as $line)
{
$split = explode(' - ', $line);
$name = $split[0];
$id = $split[1]
if($split[0] == $name_I_am_searching_for)
{
//stop searching and show the result
}
}