i have this contact collection in mongo db. I need to create and return an iterator in php for this contact collection based on the company id.
function contact_iterator($company_id)
{
// code
}
how to create and return the iterator for contact collection based on the the company_id.
The default result of a
find()is a MongoCursor .. aka an iterator :).