Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach($comments as $comment){
- foreach($comment as $key => $value) {
- $comment[$key] = htmlentities($value, ENT_QUOTES, "UTF-8");
- }
- $comment["author"] = $commentDAO->selectAuthorById($comment["author_id"]);
- $date = strtotime($comment["date"]);
- echo
- "<li class='forum-post-comment'>
- <span class='forum-post-comment-body'>" . $comment["body"] ."</span>
- <span class='forum-post-comment-date'>posted " . date('h:i', $date) . " on " . date('d-m', $date) . "</span>
- <span class='forum-post-comment-author'>
- <a id='profile-link' href='profile.php?id=" . $comment["author"]["id"] . "'>" . htmlentities($comment["author"]["username"], ENT_QUOTES, "UTF-8") . "</a>
- </span>
- </li>";
- }
- echo "</ul>";
- }
- foreach($comments as $comment){
- foreach($comment as $key => $value) {
- $comment[$key] = htmlentities($value, ENT_QUOTES, "UTF-8");
- }
- $comment["author"] = $commentDAO->selectAuthorById($comment["author_id"]);
- $date = strtotime($comment["date"]);
- echo
- "<li class='forum-post-comment'>
- <span class='forum-post-comment-body'>" . $comment["body"] ."</span>
- <span class='forum-post-comment-date'>posted " . date('h:i', $date) . " on " . date('d-m', $date) . "</span>
- <span class='forum-post-comment-author'>
- <a id='profile-link' href='profile.php?id=" . $comment["author"]["id"] . "'>" . $comment["author"]["username"] . "</a>
- </span>
- </li>";
- }
- echo "</ul>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement