help with classes
| From: | Joseph H Blythe | Date: | Wed, 14 Feb 2001 03:57:38 +0000 |
| Subject: | help with classes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-39327@lists.php.net to get a copy of this message | ||
hey all,
Was just wondering how to do the following:
<?php
class Foo {
var $bar = $foo; // causes parse error
var $bar = "$foo"; // causes parse error
var $bar = '$foo'; // works but $foo is not evaluated
}
?>
So how does one correctly assign a variable to a variable inside a class withot doing something
like:
var $bar = '';
$this->bar = $foo;
Any insight would be much appreciated.
Regards
Joseph