Hi Peter! The "var" $somevariable means that the variable is defined. You only need to use var in classes. So if you only write ordinary scrpits, you dont need to use it.
Regards Raymond "Peter J. Schoenster" <[EMAIL PROTECTED]> wrote in message 3C6FC20B.3856.610F245@localhost">news:3C6FC20B.3856.610F245@localhost... > HI, > > I was reading the docs and I see this: > > > /* This is how it should be done. */ > > class Cart > > { > > var $todays_date; > > var $name; > > var $owner; > > var $items; > > > > function Cart() > > { > > $this->todays_date = date("Y-m-d"); > > $this->name = $GLOBALS['firstname']; > > /* etc. . . */ > > } > > I don't see the point in doing > > var $todays_date; > > and > > $this->todays_date = date("Y-m-d"); > > The latter works without the need for the "var". Why should i use > "var"? > > Thanks, > > Peter > http://www.readbrazil.com/ > Answering Your Questions About Brazil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php