How do I pass a variable’s value to the caller? This is my code.
Ok I make the class file.
[php]
<?php class SimpleClass { public $var = 'a default value'; } ?>[/php]
I save the class file as SimpleClass.class.php
Now I make the page where I need to include this class file
[php]
<?php include('SimpleClass.class.php'); $test = new SimpleClass(); ?>[/php]
How do I get the value of var to store into a variable in the page with the object?
thanks!