function output_newlines($sth) { while ($result = $sth->fetch(PDO::FETCH_ASSOC)) { if ($this->_full) { $wbo = new wbo(); $wbo->populate($result); echo preg_replace('/\\n/', '\\u000a', $wbo->json()); } else { echo json_encode($result['id']); } echo "\n"; } return 1; }