getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag); $currentuser = $userservice->getCurrentUser(); $currentusername = $currentuser[$userservice->getFieldName('username')]; // Set up the XML file and output all the tags. header('Content-Type: text/xml'); echo '\r\n"; echo '\r\n"; $count = 0; $lastdate = NULL; foreach ($bookmarks['bookmarks'] as $row) { $thisdate = gmdate('Y-m-d', strtotime($row['bDatetime'])); if ($thisdate != $lastdate && $lastdate != NULL) { echo "\t\r\n"; $count = 1; } else { $count++; } $lastdate = $thisdate; } echo "";