有無陣列象下面這樣:如何從stdClass的對象數組retrive價值
Array
(
[0] => stdClass Object
(
[city_id] => 2222
[city_name] => newCity
)
[1] => stdClass Object
(
[city_id] => 4444
[city_name] => oldCity
)
[2] => stdClass Object
(
[city_id] => 6666
[city_name] => newCity2
)
)
現在,我要得到city_id
當我設置city_name
,我怎樣才能得到它在我的代碼?
例如,如果我設置爲newCity2
然後city_name
我看到6666
爲city_id
,如果你想看到一個特定的數據,那麼你通過它等
http://stackoverflow.com/questions/5156841/stdclass-object-and-array-how-to-using-php?rq=1 ..也許這個? – briosheje