Re: Extract variable out of a Class -> Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a function within a class. There is a variable inside that function which I need to access & use outside of the class/function.

For example ...

Class Test {
	function showOutput {
		if ($this->url) {
			$justTT = substr($this->url,-10,7);
			echo $justTT;
		}
	}

}

I need to use $justTT. How do I get the value of $justTT into a different variable outside of this class/function so I can use it in a different class?


Return it?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux