希望我说得对...
我怎样才能找到 ID = 68 的索引?
我需要帮助创建一个返回索引 2 的函数...谢谢!
$posts = Array (
[0] => stdClass Object
(
[ID] => 20
[post_author] => 1
[post_content] =>
[post_title] => Carol Anshaw
)
[1] => stdClass Object
(
[ID] => 21
[post_author] => 1
[post_content] =>
[post_title] => Marie Arana
)
[2] => stdClass Object
(
[ID] => 68
[post_author] => 1
[post_content] =>
[post_title] => T.C. Boyle
)
[3] => stdClass Object
(
[ID] => 1395
[post_author] => 1
[post_content] =>
[post_title] => Rosellen Brown
)
)