Skip to content
Advertisement

Tag: stdclass

PHP stdClass nested properties

This used to work for me but it no longer does. What’s the new / better methodology for this? Now I get: Answer You need to create the nested object explicitly. But if you’re just creating JSON, it would be simpler to use associative arrays instead of objects. They can be written as literals easily.

Get stdClass Object value

I’m trying to get a value from stdClass Object array with no success. Here is the code I’m running: $myjson = ‘{“2”:{“label”:””,”value”:””,”type”:null,”validation”:null,”required”:null}, “6”:{“…

Advertisement