I am trying to list photo albums where each album contains individual photos. This is similar to categories where each category cotains posts.
I have two database tables, namely "albums" and "photos".
The albums table has columns id, album_name, and album_description.
The photos table has columns id, photo_is_in, photo_name and photo_description.
I used INNER JOIN to combine the albums and photos table to produce the flat $albums array below: