How to access php curly brace object property [duplicate]
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: How to access object properties with names like integers? print_r($myObj) gives the following result: stdClass Object ( [4021450] => stdClass Object ( [property1] => ooo [property2] => xxx ) [3971601] => stdClass Object ( [property1] => 123 [property2] => 356 ) ) How can I using the curly brace syntax with variable to access the sub-object ? I tried: $myObj->'3971601'; // Parse error: syntax error $myObj->{