Obi1-Cannabis Posted May 31, 2007 Share Posted May 31, 2007 Hi,I am trying to make a class 'photos' wich will be like a collection of class 'photo'... now, i think there is no php function to create object collections... but if anyone have ever simulated it or has any idea about how to, please let me know.Thank you Link to comment Share on other sites More sharing options...
justsomeguy Posted May 31, 2007 Share Posted May 31, 2007 Store the photos in an array property inside the photos class. The array can dynamically resize according to how many elements you have in it. You can have methods on the photos class to add a new photo, check if one exists, return one, get the number of photos, delete one, etc. All the methods would just do various operations on the array. Link to comment Share on other sites More sharing options...
Obi1-Cannabis Posted June 1, 2007 Author Share Posted June 1, 2007 yes , that's it! it's starting to work fine... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.