Your Posts
prepare("SELECT * FROM posts ORDER BY id DESC LIMIT 10");
$stmt->execute();
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$post = new Post($con, $row);
$postUrl = $post->getPostUrl();
$postAuthor = $post->getPostAuthor();
$postedDate = $post->getPublishedDate();
$postContent = $Parsedown->text($post->getPostContent());
$item = "
" . $postAuthor . " ยท " . $postedDate . " GMT +7
" . $postContent . "
View Post
";
echo $item;
}
?>