Maybe I am overlooking something, but I stumbled across this:
$employees = new stdClass();
$employee_id = 5;
$employee = array();
$employee["id"] = $employee_id;
$employee["name"] = "John;
$employees->$employee_id = $employee;
Now I want to change the employee Name:
$employee = $employees->$employee_id;
$employee["name"] = "Tom";
Now I have two problems:
The employee object seems not to be passed by reference, because the employee within the employees is still named John.
How would I retrieve the employee name? echo {$employee->$employee_id}["name"]; does not work
Thanks for the help,
Martin