function markupPosts() { $filearray = getPostFilenames(); if (!$filearray) { return '<div id="content"><h3>Nothing to see here.</h3></div>'; } foreach ($filearray as $file) { //add markup to posts and put them together with the newest post on top $posts = getMarkupPost($file) . $posts; $posts = '<div class="post" id="' . $file . '">' . "\n" . '<h2 id = "' . $file . '_title" class="thesubject">' . getPostSubject($file) . '</h2>' . $posts; } $posts = '<span class="createnew"> + </span>' . $posts; $posts = '<div id="content">' . "\n" . $posts; $posts .= "\n" . '</div>'; return $posts; }
<?php require_once 'postfunctions.php'; $postID = $_POST["id"]; $postTitle = getPostSubject($postID); $rawText = getMarkupPost($postID); $filledPost = '<h2 id = "' . $postID . '_title" class="thesubject">' . $postTitle . '</h2>' . $rawText; echo $filledPost; ?>