Schlo_50 Posted May 27, 2008 Share Posted May 27, 2008 Hi guys, I have two lists in a text file (.DAT) and I need to find the 2nd key of the first list and check to see if there is a match between that key and the 2nd key of my other list. I can found and defined the keys as variables but im not sure how I can try to find a match between them? elseif($_GET['action'] == "find_lost") { $lines = file("data/sub_categories.DAT"); foreach ($lines as $line) { $data[$key] = explode("|", $line); $lookup = $data[$key][2]; } $linesb = file("data/threads.DAT"); foreach ($linesb as $lineb) { $datab[$keyb] = explode("|", $lineb); $find = $data[$key][2]; } } Could someone please help me? I need someway to print out any matches between $lookup and $find. Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/107408-solved-need-some-help-please/ Share on other sites More sharing options...
Barand Posted May 27, 2008 Share Posted May 27, 2008 Double posted. Closed. Link to comment https://forums.phpfreaks.com/topic/107408-solved-need-some-help-please/#findComment-550633 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.