Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help please
#2
To use a Class from inside another class you need to declare the class you want to use as global inside the function you want to use it in.

So say i have:

class lulz
{
public function lolz($lol)
{
return $lol;
}
}

class rofl
{
public function roflz($lul)
{
return $lul;
}
}

to call $lulz->lolz inside of roflz I would do this:

class rofl
{
public function roflz($lul)
{
global $lulz
$lul = $lulz->lolz;
return $lul;
}
}
Need website or forum help?
[Image: logo.png]
Reply


Messages In This Thread
Help please - by fl3x - 06-13-2011, 12:47 PM
RE: Help please - by 0xE9 - 06-13-2011, 08:10 PM
RE: Help please - by fl3x - 06-14-2011, 11:22 AM
RE: Help please - by 0xE9 - 06-14-2011, 01:09 PM
RE: Help please - by ๖ۣۜDunsparth - 06-14-2011, 02:08 PM
RE: Help please - by fl3x - 06-15-2011, 08:01 PM
RE: Help please - by ๖ۣۜDunsparth - 06-15-2011, 09:33 PM
RE: Help please - by 0xE9 - 06-16-2011, 01:28 AM
RE: Help please - by -Dreams - 06-13-2011, 11:36 PM
RE: Help please - by Carbon Host - 08-02-2011, 08:36 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)