how to make a class to ember you variables?

From: Date: Thu, 24 Aug 2000 08:05:07 +0000
Subject: how to make a class to ember you variables?
Groups: php.general 
Request: Send a blank email to php-general+get-13325@lists.php.net to get a copy of this message
Hi, I have a question about writing a class.... I am calling to a class from my script: $myClass->func1(); Now, after the func1() was executed I want to remember it's returned value and use it within the same class but in a different function func2(); which will be called somewhere later on the same script. for example: /* Inside the Class: */ function WhatEver() { whatever; whatever; return $whatever; } function Func1() { $v1= ($this->WhatEver()); return $v1; } function Func2() { $v2= ($this->WhatEver()); return $v2; } function myResult() { $myResult = ($v2-$v1)*100; return $myResult; So then after I defined the class in my script I would like to call, let's say, //at the 13: $myClass->Func1(); // After lot's of functions, algorithms etc.... //at the 356: $myClass->Func2(); // And at the very bottom of the script: echo $myClass->myResult(); Is that possible to do? Or there's something that I don't yet understand... Thank you. Maxim Maletsky - maxim@j-door.com <mailto:maxim@j-door.com> Webmaster, J-Door.com / J@pan Inc. LINC Media, Inc. TEL: 03-3499-2175 x 1271 FAX: 03-3499-3109 http://www.j-door.com <http://www.j-door.com/> http://www.japaninc.net <http://www.japaninc.net/> http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/>

« previous php.general (#13325) next »