note 61841 deleted from function.include by tomsommer
| From: | tomsommer@php.net | Date: | Fri, 03 Mar 2006 10:22:43 +0000 |
| Subject: | note 61841 deleted from function.include by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-104754@lists.php.net to get a copy of this message | ||
Note Submitter: stian at w4n dot org
----
A great way to do a "include in class":
class test {
var $a = '123';
function test() {
include ('myfile.php');
myfile_test($this);
}
}
$class = new test(); // Print 123
myfile.php:
function myfile_test($mythis) {
echo $mythis->a // Print 123
}