我做了一個ajax調用,並以此形式從控制器中獲取數據。在AJAX調用後訪問對象的屬性
Array
(
[0] => stdClass Object
(
[cat_id] => 2
[title] => Clothes
[description] => Clothing for men and women
[active_coupon_counter] => 0
[store_id] => 1
)
[1] => stdClass Object
(
[cat_id] => 17
[title] => Designer
[description] => ;description
[active_coupon_counter] => 0
[store_id] => 1
)
[2] => stdClass Object
(
[cat_id] => 24
[title] => Fashion
[description] => ;description
[active_coupon_counter] => 0
[store_id] => 1
)
)
Array
這似乎是愚蠢的,但我無法弄清楚如何在地球上我會訪問每個陣列的cat_id
和title
屬性!
任何幫助,傢伙?
謝謝。
array [i]正在返回A,r,r,a,y .... – HarshithaShankar
您能向我們展示您的實際程序嗎?你的返回數據如何顯示 – epoch
這是它的樣子。我做了一個'提醒',這顯示出來了。 – HarshithaShankar