In my real code, the tables are much more complex and so is how the data is handled. One table wouldn't work at all.
As for creating two arrays from two loops, that would lead me to having arrays with arrays with arrays in them, and all sorts of messy goodness.
A suggestion by a member of Sitepoint (
http://www.sitepoint.com/forums/show....php?p=1149531) was to create a 3rd table for containing the relations, and then using 1 query to access all the required data through an inner join.