simple OO question
| From: | John LYC | Date: | Mon, 05 Mar 2001 03:06:47 +0000 |
| Subject: | simple OO question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42555@lists.php.net to get a copy of this message | ||
can i do this..?
//declaring class
class myclass{
//declaring properties
...
....
//declaring methods..
function mymethod(){
//can i declared variable in method?
var $myvar;
...
//do something
}//end of mymethod
///////////////////
if yes, do i access myvar like this.
$item = new myclass;
print $item->mymethod()->myvar;
thanks
john