use string as a property name for bbject php code example Example: PHP dynamic property name $obj->{$field}