Hi,
I'm just starting to code using classes. I have a question about it...
For instance, I have a file called class.php, containing the class called "class1" with a function called ProcessUser.
Also I have a file index.php which might look like the one below:
// index.php
include('classes/class.php');
$cclass = new class1;
$cclass->user= $user;
$cclass->ProcessUser();
The ProcessUser function puts a value into a variable, lets say $username = "John".
Now I want to display the value of $username in index.php
Just putting echo($username) in index.php will not work (ofcourse) but how can I work with variables that are generated in a class?
Thanks!
Tom