SyntaxFix
Write A Post
Hire A Developer
Questions
Just store the property name in a variable, and use the variable to access the property. Like this:
$name = 'Name'; $obj->$name = 'something'; $get = $obj->$name;