Example #1
0
?>
    </h2>
    <div>
        <?php 
echo convertSqlDate($row['created_at']);
?>
    </div>
    <p>
        <?php 
echo $paraText;
?>
    </p>


    <h3><?php 
echo countCommentsForPost($postId);
?>
 comments</h3>
    <?php 
foreach (getCommentsForPost($postId) as $comment) {
    ?>
        <?php 
    // For now, we'll use a horizontal rule-off to split it up a bit
    ?>
        <hr />
        <div class="comment">
            <div class="comment-meta">
                Comment from
                <?php 
    echo htmlEscape($comment['name']);
    ?>
Example #2
0
    <?php 
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
    ?>
        <h2>
            <?php 
    echo HTMLEscape($row['title']);
    ?>
        </h2>
        <div>
            <?php 
    echo convertSqlDate($row['created_at']);
    ?>

            <?php 
    echo "<br>" . countCommentsForPost($row['id']) . " comments.";
    ?>
        </div>
        <p>
            <?php 
    echo HTMLEscape($row['body']);
    ?>
        </p>
        <p>
            <a href="view-post.php?post_id=<?php 
    echo $row['id'];
    ?>
">Read more....</a>
        </p>
    <?php 
}