stdclass

Getting a value from an object php

Hi. I used var_dump on an object in my code. print var_dump( $$user); result: object(stdClass)#35 (1) { ["user1_ready"]=> string(1) "0" } How do I get to this value (0 in this case). I tried print $$user which resulted in Catchable fatal error: Object of class stdClass could not be converted to string in I need something like if($...

PHP stdClass variable attributes question

Hi I have code like this: foreach($attributes as $attrib => $options){ if($bb->$attrib != $default->$attrib){ $delete = false; } } $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 ...