I have this little snippet:
$action = $_GET['action'];
// some other code
// works
$properties = $client->__soapCall($action, array(
array(
'Page' => $x
)
));
// try to get access to values by var $action
$obj = $properties->$action->item;
This gives me an error. My intention was to use the script only once for multiple operations by getting different actions.
...but I have no idea how to solve this and I haven't found any helpful posts or articles.
var_dump($properties):
object(stdClass)#84 (4) {
["PropertyGroups"]=>
object(stdClass)#85 (1) {
["item"]=>
array(73) {
[0]=>
object(stdClass)#86 (7) {
["PropertyGroupID"]=>int(1)
}
}
}
}
This gives me an error.We should guess it right?action = GetPropertyGroups,Undefined property: stdClass::$GetPropertyGroups