I have an array which is printing out like this:
Array ( [0] => stdClass Object ( [term_id] => 4 [name] => Web Layouts [slug] => web-layouts [term_group] => 0 [term_taxonomy_id] => 4 [taxonomy] => category [description] => [parent] => 1 [count] => 2 [object_id] => 6 [cat_ID] => 4 [category_count] => 2 [category_description] => [cat_name] => Web Layouts [category_nicename] => web-layouts [category_parent] => 1 ) )
I’m trying to print out just the name of the item in the array this is what I tried:
print $postCategory[0][‘name’];
but it gives me this error message:
Fatal error: Cannot use object of type stdClass as array in
I’m not familiar with the stdClass, any idea what to do?