Thanks for the ideas guys, I've done some thinking and looking into multi-dimensional arrays and use of hashes to construct the matrix that I'm ultimately looking for. Here's what I've come up with that seems to be working, and is within my grasp:
First: I splice all the arrays together so that I'm guaranteed that all filenames are found, regardless of which data sources (table1, table2, dir1, and/or dir2) they may or may not be found in.
$allfnames = $table1;
array_splice($allfnames,1,0,$table2);
array_splice($allfnames,1,0,$dir1);
array_splice($allfnames,1,0,$dir2);
Next: Then get rid of the duplicates in the spliced array:
$allfnames = array_unique($allfnames);
Finally: Loop through the spliced and parsed array and look for matches against each individual array:
echo"<table><tr><td></td><td>image</td><td>blog</td><td>thumb</td><td>fullsize</td></tr>";
foreach ($allfnames as $filename) {
echo "<tr><td>$filename</td>";
$s1 = array_search($filename,$table1,false);
if($s1 !== false) {
echo "<td>X</td>";
} else {
echo "<td></td>";
}
$s2 = array_search($filename,$table2,false);
if($s2 !== false) {
echo "<td>X</td>";
} else {
echo "<td></td>";
}
$s3 = array_search($filename,$dri1,false);
if($s3 !== false) {
echo "<td>X</td>";
} else {
echo "<td></td>";
}
$s4 = array_search($filename,$dir2,false);
if($s4 !== false) {
echo "<td>X</td></tr>";
} else {
echo "<td></td></tr>";
}
}
echo"</table>";
So that it looks like this:
..............table 1....table 2....dir 1....dir 2
foo.bar........X...........X..........X........
bar.foo.....................X..........X........
far.boo........X...........X...................X
boo.far........X................................X
etc...
Thanks again,
ak