Help - Search - Members - Calendar
Full Version: Object Referencing
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
The Seventh Hokage
CODE
class eyes
{
var $name;
var $color;
var $target;

function focus($ecolor,$etarget)
{
$this->target=$etarget;
$this->color=$ecolor;
echo $this->target;
echo $this->color;
}



}

$redeye= new fruit("red","Sun");
$greeneye= new fruit("green",$redyeye);


I'm trying to test if i am accessing this the correct way. i want the green eye to focus on the whole redeye object.
Bogey
This documentation should be a good read on how to set variables through references.
The Seventh Hokage
QUOTE(Bogey @ Jul 8 2009, 01:26 AM) *
This documentation should be a good read on how to set variables through references.

thanks. i found that site a few days ago. its helping me alot. thanks for replying tho
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.