我已經在codeigniter中得到以下輸出了嗎?如何使用stdclass對象從數組中獲取值?
Array
(
[0] => stdClass Object
(
[id] => 8
[book_category] => C Program
[book_id] => 2
[book_name] => C Language
[book_category_id] => 8
[book_in_stock] => 5
)
[1] => stdClass Object
(
[id] => 8
[book_category] => C Program
[book_id] => 1
[book_name] => C++
[book_category_id] => 8
[book_in_stock] => 10
)
[2] => stdClass Object
(
[id] => 9
[book_category] => English
[book_id] => 3
[book_name] => Comp Eng
[book_category_id] => 9
[book_in_stock] => 5
)
[3] => stdClass Object
(
[id] => 9
[book_category] => English
[book_id] => 4
[book_name] => Eng English
[book_category_id] => 9
[book_in_stock] => 5
)
)
所以我需要從上面的數組中獲取值,而不是爲了調試目的?
已經爲您提出問題的請求提供瞭解決方案。嘗試並分享想法。 –