Update object value within foreach loop

I would like to loop through the contents of a query object update certain values and return the object.\[code\]function clearAllIds($queryObject){ foreach($queryObject->result() as $row) { $row->id = 0; }return $queryObject}\[/code\]In this example I would like to zero out all of the ID values. How can I accomplish this within the foreach loop?Please excuse the formatting.
 
Back
Top