About Classes and Scope
| From: | Nick Wilson | Date: | Wed, 18 Feb 2004 09:22:45 +0000 |
| Subject: | About Classes and Scope | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-178077@lists.php.net to get a copy of this message | ||
Hi all,
I would like a class to test a configuration var and act according to
the vars value a bit like this:
<?php
$myconfig=TRUE;
class myclass {
if($myconfig) {
var $something=1;
}
}
I know that that is not the way it should be done though. What is the
best way to do this?
Many thanks....
--
Nick W