On Mon, 12 Feb 2001 20:11:14 -0800
Joe wrote:

JC> 
JC> I was curious too, so I looked it up. Seems you can't. From
JC> http://www.php.net/manual/en/language.oop.php
JC> 
JC>     "Note: In PHP 4, only constant initializers for var variables are
JC> allowed. Use constructors for non-constant initializers."
JC> 
JC> Hope this helps,
JC> 
JC> Joe
JC> 

I missed that one little cryptic note :-) 

I basically just made a function that sets the var variable to what I wanted. Unless 
*anyone* knows a better way?

class Foo {
var $bar;

    function setBar($bar) {
      this->bar = $bar;
    }

}

Thanks for your help!

Regards,


Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to