I want to be able to set an attribute of an object but the attribute name would be generated. How can I accomplish this in PHP, without using eval()
e.g.:
$obj->name = "Prakash Raman"; // Works
$obj->$attr_name = <some value>; // Would want something like this to work
I would like to be able to change $attr_name.
Thanks.