Re: how do you use a CLASS ???

From: Date: Fri, 20 Jul 2001 18:12:57 +0000
Subject: Re: how do you use a CLASS ???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58952@lists.php.net to get a copy of this message
Class files should be independant of platform. However, that does not mean it is not. For instance the class may query the database. So then it would be dependant on the database, type of database, or whatever. Your variables should not be the same name as your classes. e.g. $myCar = new Car() $blueCar = new Car() $redCar = new Car() you should always have "new" and call the constructor (e.g. Car() ) when creating a new instance or object. "Sunny at wde" <sandeep_wde@yahoo.com> wrote in message news:20010720172551.15726.qmail@web3902.mail.yahoo.com... > ok, this must be the simplest question alive, but help me please?? > > i've seen loads of classes all over the net, and i want to use them, > but not sure where to start! > > are class files independent of platform?? > do you have to name your variables same as them? > > or do i just call it or something? they dont usually have > documentation, so i'm a bit stumped :( > > /sunny > > ____________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk > or your free @yahoo.ie address at http://mail.yahoo.ie

« previous php.general (#58952) next »