My code:
class Address{
public var $Street;
}
class Employee{
public var $ID:
public var $Name:
public var $Address;
}
$myEmployee = new Employee();
$myEmployee->Address = new Address();
How do I access the the street now?
$street = $myEmployee->$Address->Street;
$street = $myEmployee->Address->Street;
Both give me warnings in Eclipse. I was thinking of:
$street = $myEmployee['Address']->Street;
Is this correct?