I've got a very basic class built, with a constructor, and then I make an array of these different objects. Then I iterate through them and if conditions match, I spit out the data that I want.

Instead of make an array of these different objects, wouldn't it be great if the object housed it's own array, and then had its own function to iterate through everything just w/a simple method call. If there's any sharp PHP minds w/solid experience w/classes & objects, would you help me streamline what I've got into one decent class?

$messages is initialized a new instance of "msg". And I do something like $messages->add_msg("table", "msg_area", "msg_text goes here". That would save it to an array stored inside of $messages. Then a call of $messages->compile_msgs() would check if the current table matches a table-specific message and add it to a global variable on the outside if it does.

I appreciate any knowledge that you guys who are experienced in this can pass on to me.

Sometimes it's just not worth the overhead and extra code of using objects... particularly with PHP's arrays being so versatile.

Also, notice I'm using foreach -- it's usually a REALLY bad idea to try and trust numeric indexes on PHP arrays when looping... oh, and the above code is untested/not debugged, so there may be a typo or two.

Dearthshadow, that top example is exactly what I'm trying to implement here. Even if the overhead is more expensive, I know I've got to get a handle on using classes like that, just to know whether or not it makes sense. I'm going to give it a shot, thanks for the help.