例如說我有一個名爲$列表的對象數組是這樣的:在php中刪除對象數組中的對象?
<(stdClass)#16 (3) {
["1"]=>
<(8) "50504496"
["2"]=>
<(8) "12435374"
["3"]=>
<(8) "12436374"
Im做對象數組上一個foreach,如果他們存在於數據庫即
foreach($list as $l){
//do the query
if(it exists){
//remove from objects: this is where i need help!!
}
}
刪除他們,我有數據庫邏輯,即時通訊只是堅持知道我可以如何刪除對象,我想也許我應該創建一個新的對象,並添加他們。感謝 }
'unset' [php.net/unset](http://li.php.net/unset) – EaterOfCode 2012-08-17 11:59:52