I am having some trouble with a basic php issue and want to know if anyone can help me out. Basically I need to combine the results of 2 queries, and merge the arrays based on the key, while retaining the 1 key to 1 value that is present in both queries.
For example: "select * from table 1, table 2 where table1.id = table2.id"... make an array of this.
Then: "select * from table3, table4 where table3.id2 = table4.id2" .. make another array.
Finally: While ($res) { print out each line with }.
Any ideas on how to handle this? Pseudo code greatly appreciated. The relationship betwee the ids is that table1.id = table3.id but the other ids are just to join between the tables as presented in the queries.