[nycphp-talk] Object Methods and Properties
Joe Crawford
jcrawford at codebowl.com
Tue Jul 27 16:16:54 EDT 2004
i have things like this
class MyClass {
var $_header;
var $_body;
var $_footer;
}
and i am trying to use that code to dynamically choose which variable to
change.
Joe Crawford Jr.
On Tue, 2004-07-27 at 16:11, Sol wrote:
> > can anyone tell me why this code will not work>
> >
> >
> > function setPart($part, $val, $append) {
> > if(($part) && ($val)) {
> > if($append) $this->_$part .= $val;
> > else $this->_$part = $val;
> > }
> > }
>
> if($this->_$part is declared as var $_part){
>
> $this->_$part should be $this->_part;
> }
>
> =====
> Sol Tour
> PHPBTREE
> http://phpbtree.com
>
>
>
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail
> _______________________________________________
> New York PHP Talk
> Supporting AMP Technology (Apache/MySQL/PHP)
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.newyorkphp.org
>
>
More information about the talk
mailing list