add(" WHERE id = ?", [$_GET['id']]); } elseif (isset($_GET['section'])) { $query->add(" WHERE sect LIKE "); $sect = explode(',', $_GET['section']); for ($i=0; $iadd('? OR sect LIKE ', [strtr($sect[$i],'*','%')]); } $query->add('?', [strtr($sect[count($sect) - 1],'*','%')]); } $query->add(" ORDER BY sect,ts DESC"); $query->add(" LIMIT ?", [$limit]); $res = db_query($query); $notes = []; while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) { $notes[$row['id']] = $row; } header('Content-type: text/xml'); ?> xml version="1.0" encoding="ISO-8859-1"?> PHP Manual User Notes https://master.php.net/manage/user-notes.php PHP Manual User Notes http://php.net/images/php.gif https://master.php.net/manage/user-notes.php <?php echo htmlspecialchars(substr($note['note'], 0, 40)); echo strlen($note['note']) < 40 ? '...' : ''; ?> https://master.php.net/note/edit/ ]]>