I want to fetch the term_taxonomy_id from the array below but every time it gives me the following error.
Catchable fatal error: Object of class WP_Error could not be converted
to string in C…..
Array
(
[0] => stdClass Object
(
[term_id] => 5
[name] => fonts
[slug] => fonts
[term_group] => 0
[term_taxonomy_id] => 5
[taxonomy] => category
[description] =>
[parent] => 0
[count] => 2
[object_id] => 96
[cat_ID] => 5
[category_count] => 2
[category_description] =>
[cat_name] => fonts
[category_nicename] => fonts
[category_parent] => 0
)
)
What have you tried to get that error? Try this: