How to assign value of array to existing object property. I tried this and got error.
$fieldss = array("name"=>"User Name", "fields"=>"10091437300560754");
$list = object(stdClass)[325]
public 'id' => string '1' (length=1)
public 'form_id' => string '6' (length=1)
public '10091437300560754' => string 'Ronaldo' (length=9)
//then I tried to access:
$list->$fieldss['fields']; which equals to 'Ronaldo'.
//but It gives undefined property:$10091437300560754;
Above: $fieldss['fields'] = "10091437300560754";
and $list->$fieldss['fields']
means $list->10091437300560754
but why I get undefined property. Please help.
Updated
I tried my code in localhost with PHP v5.3.8 It worked fine But When I uploaded to server in which PHP v5.4. It gives me error like above