I iterate through an array of objects and want to delete one of the objects based on it\'s \'id\' property, but my code doesn\'t work.
foreach($array as $ele
This should do the trick.....
reset($array); while (list($elementKey, $element) = each($array)) { while (list($key, $value2) = each($element)) { if($key == 'id' && $value == 'searched_value') { unset($array[$elementKey]); } } }