Welcome Guest, Not a member yet? Register   Sign In
Arrays, tables and headache
#4

[eluser]Michael Wales[/eluser]
It's because you are looping over the same $data['gallery'] - you need some sort of unique identifier to make it loop through that particular albums gallery.

In my example above, I have made a gallery a child-object of album object. You will probably just want to create a multi-dimensional array where each album has a gallery array, and underneath that, each gallery has a unique ID (if you are supporting multiple galleries per album).


Messages In This Thread
Arrays, tables and headache - by El Forum - 02-24-2008, 03:14 PM
Arrays, tables and headache - by El Forum - 02-24-2008, 03:38 PM
Arrays, tables and headache - by El Forum - 02-24-2008, 03:57 PM
Arrays, tables and headache - by El Forum - 02-24-2008, 04:28 PM
Arrays, tables and headache - by El Forum - 02-24-2008, 05:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB