?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Re: required help
Author:??(---.80-202-73.nextgentel.com)
Date:???09-30-03 01:07

Try this :)


// Get the table-fields
$result = mysql_query("SELECT * FROM tablename");
while($row = mysql_fetch_object($result)) {
preg_match("/<(.*?)@/", $row->sender, $match);
$sender[] = $match[1];
$receiver[] = $row->receiver;
$sent[] = $row->sent;
}

// Parse trough the file
$lines = file("ld1.txt");
foreach($lines as $line) {

list($uid, $department, $branch) = explode(":", rtrim($line));
if(in_array(trim($uid), $sender)) {

$names = array_flip($sender);
$i = $names[trim($uid)];

print("sender: ".$uid."
\n");
print("department: ".$department."
\n");
print("branch: ".$branch."
\n");
print("receiver: ".$receiver[$i]."
\n");
print("sender: ".$sent[$i]."
\n");

break;
}
}

?>

?Topics Author? Date
?required help??new
vaishali 09-29-03 20:39?
?Re: required help??new
Kr|Z 09-30-03 01:07?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
????

Provided By
Phorum