[phplib] Objects and Classes From: Nicolas di Tada (nicdit <email protected>)
Date: 07/17/00

hi, im new in the list, and new with php, im having some problems with
classes and objects. Its seems like i cant get a property from an object
that is member of another object. Can anyone help me? My problem appears at
the end of the code, in the for, i cant get any of the properties of the
tmp...ill appreciate any help, i really dont know what to do...

thank you

nicolas

<?

class MenuItem
{
        var $Name;
        var $Title;
        var $URL;
        var $ImageURL;
        var $Parent;

        function MenuItem($Name = "", $Title = "", $URL = "", $ImageURL = "",
$Parent = "")
        {
                $this->Name = $Name;
                $this->Title = $Title;
                $this->URL = $URL;
                $this->ImageURL = $ImageURL;
                $this->Parent = $Parent;
        }
}

class NavBar
{
        var $MenuItems;
        var $ItemCount;
        var $TableId;
        var $TableWidth = 120;

        function AddMenuItem($MenuItem)
        {
                $this->MenuItems[$this->ItemCount] = new MenuItem;
                $this->MenuItems[$this->ItemCount] = $MenuItem;

                $this->ItemCount++;
        }

        function Make()
        {
                $tmp = new MenuItem;

                for($i=0 ; $i < $this->ItemCount ; $i++)
                {
                        $tmp = $this->MenuItems[0];
                        ....
                        ...
                        ....

                }

        }
}
?>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>