このような配列を返す関数があります
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
)
)
)
さらに使用するために単純化するために、この配列を [tid] のキーと [name] の値を持つ単純な配列に変換したいと思います。したがって、次のようになります。
Array
(
[1] => About Us
[200] => Stories
)
適切なコード構文に関するヒントやヘルプは素晴らしいでしょう。ありがとう