> As far as I can tell there is not an easy way yet to create packages in > PHP5. > > It seems the following is the best option: > include('classes/help/Search.inc'); > > // Inside Search.inc and in the same "package" > include('OtherClass.inc'); > include('AnotherClass.inc'); > > Is there a better way? > > Thanks! >
Not really... That is about it. PHP does not offer a way to group classes, scripts, and functions into logical "packages" or "applications" like some other languages do (asp comes to mind (and no, I'm not an asp advocate)). However, while it's common to save each class in its own file, it isn't at all uncommon to have multiple classes in a single file - especially if they are typically used together like parent and extended classes or interfaces and implementations. This method will also save disk io by only having to include one file. Jim Grill -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php