I'm doing some fiddling in Drupal, and I came across a function that returns this array when I print_r() it: Array ( [0] => stdClass Object ( [tid] => 1 [vid] => 1 [name] => Final [description] => [weight] => 0 ) ) PHP: Everytime I try to print a value in this array, I get a message like this: Object of class stdClass could not be converted to string in ...common.inc(1352) : eval()'d code on line 7. PHP: So how the heck do I pull a value out of this array?
//assuming the array is in $var print_r($var[0]); PHP: It seems that the error is somehow tied to the use of eval() . You need to tell us more of what you were trying to do.