Re: Array inside Class

From: Date: Fri, 10 Sep 2004 18:42:31 +0000
Subject: Re: Array inside Class
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-196334@lists.php.net to get a copy of this message
Works fine within the constructor, thanks. Dirk On Fri, 10 Sep 2004 14:38:45 -0400, John Holmes <holmes072000@charter.net> wrote: > From: "dirk" <dirk.kleinschmidt@gmail.com> > >> Try this: > >> var $input = array(1,2,3); > >> var $input2 = array(); > >> $this->input2 = array_pad($this->input,10,1); > > > > Well, doesn't work either: > > > > Parse error: parse error, unexpected T_VARIABLE, expecting T_FUNCTION > > in /srv/www/htdocs/stundenplan/stpoo.php on line 5 > > The array_pad part needs to go inside of a function. The constructor would > be a good place for it. > > ---John Holmes... > > -- Try http://einx.dyndns.org

« previous php.general (#196334) next »