(PECL mongo >=0.9.0)
MongoCollection::remove — Remove records from this collection
Description of records to remove.
Remove at most one record matching this criteria.
Returns if the command was executed successfully.
Example #1 MongoCollection::remove() with justOne example
<?php
$radioactive = $db->selectCollection('radioactive');
// count how much more plutonium there is
$remaining = $radioactive->count(array('type' => 94));
$halflife = $remaining/2;
// remove half of it
while ($halflife > 0) {
$uranium->remove(array('type' => 94), true);
$halflife--;
}
?>