Learned a lot about array functions today, but have run out of research energy to address this last bit of my project...
I've got four arrays that I'm constructing from two distinct tables (table 1 -and- table 2) and two distinct directories (dir 1 -and- dir 2). All four sources will normally contain a file with the same filename.
Dir 1 and dir 2 will never contain duplicate files (obviously). However, table 1 and table 2 may contain duplicate references to a file.
It is possible that one or more of the four sources may become out of sync and no longer contain file (or reference to file) "xyz" - these are considered to be orphaned.
Finally - the question:
Is there an elegant approach to ultimately arriving at an array_diff that can determine if any given file doesn't exist in all four places? The problem that I've got with array_diff now is that the first array provides the basis for comparison, and I can't rely on the first array always containing every file. I guess I could run array_diff 24 times comparing each combination of the four arrays (432*1), or a bunch of array_intersect/array_diff combinations but that seems kind of crazy. There must be a more logical way.
Any suggestions?