A stupid question about classes

From: Date: Sat, 01 May 2010 16:53:02 +0000
Subject: A stupid question about classes
Groups: php.general 
Request: Send a blank email to php-general+get-304815@lists.php.net to get a copy of this message
Hello everyone, Just a basic question. I have my class starting like this: Class OireMail { // these are required public $smtp_server=""; public $domain=""; public $from=""; public $login=""; public $pass=""; And then go the function themselves. I was told that it's better to put the initial variables in the __construct() function. What are the advantages of doing that and if I need to do it, how would I call the class from another file then? Thanks! -- With best regards from Ukraine, Andre Http://oire.org/ - The Fantasy blogs of Oire Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: http://twitter.com/m_elensule

« previous php.general (#304815) next »