PHP stdClass variable attributes question

CerMataJary

New Member
I have code like this:\[code\]foreach($attributes as $attrib => $options){ if($bb->$attrib != $default->$attrib){ $delete = false; }}\[/code\]$bb is a stdClass, im reading and writing these attributes to it in this way, because I have them stored in an array. Now this works in PHP 5.3 which I have confirmed, I'm pretty sure it works on 5.2 too, but on 5.1 there seems to be an issue where you can not write to the object in this way, no errors or anything, it just won't write...Does anyone know what is the problem? Since what version does it work? I looked in the PHP documentation but I can't find anything about this.
 
Back
Top