Refer to class within function?
- From: Brent <"writeBrent at the google mail place">
- Date: Thu, 28 Apr 2005 18:59:57 -0700
Am I supposed to get an error when I try to access a class within a function?
E.g.:
somepage.inc.php has a class:
--------------
class myclass
{
myclass()
{
return "foo";
}
}-------------
Having included this class on default.php, I try to access it like this...
-------------
function getdata(){
$thisreturn = new myclass();
return $thisreturn;
}
-------------If an error is expected, is there any way to access a class from within a function?
Thanks for any help.
--Brent .
- Follow-Ups:
- Re: Refer to class within function?
- From: Oli Filth
- Re: Refer to class within function?
- Prev by Date: Php sessions
- Next by Date: Re: get browser details
- Previous by thread: Php sessions
- Next by thread: Re: Refer to class within function?
- Index(es):
Relevant Pages
|