Code: Select all
Table1: 1,2,3,4
Table2: 1,5,7,8
Table3: 1,3,6I want PHP to sort through the fields to find the match 1,2,3,4 and 1,3,6 but obviously not 1,5,7,8.
This is what I have so far but it's not working so well =\
Code: Select all
$query = "SELECT * FROM table";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
$list = $row['field'];
$array = explode(',', $list);
}
foreach ($array as $new => $value) {
$records[] = "<a href=\"".$row['field1']."\">".$row['field2']."</a>";
}
echo implode(' | ', $records_menu);