I have a function that returns an array like this
Array
(
[0] => stdClass Object
(
[tid] => 1
[vid] => 2
[name] => About Us
[description] =>
[format] => wysiwyg_editor
[weight] => 0
[depth] => 0
[parents] => Array
(
[0] => 0
)
)
[1] => stdClass Object
(
[tid] => 200
[vid] => 2
[name] => Stories
[description] =>
[format] => wysiwyg_editor
[weight] => 0
[depth] => 0
[parents] => Array
(
[0] => 0
)
)
)
To simplify it for further use I would like to convert this array into simple one with keys as [tid] and values as [name] So it would be smth like this:
Array
(
[1] => About Us
[200] => Stories
)
Any tips or help with proper code syntax would be great. Thanks