I have this object:
$myobject = (object) [
'name' => [],
'value' => [],
'id' => [],
];
I want to add some values in a for each loop, but array push does not seem to work.
I've tried this:
$object_name = $myobject->name;
array_push($object_name, "testName");
I've looked everywhere but can't seem to find the answer.