'."\n"; echo ''."\n"; echo '' . htmlspecialchars($blog_title) . ''."\n"; echo '' . $blog_base_url . "blog". "\n"; echo '' . "\n"; function beginning($text, $len = 500) { $text = preg_replace('#<.+>#isU', ' ', $text); if (strlen($text) > $len) { $text = substr($text, 0, $len)."..."; } return $text; } foreach ($posts as $post) { echo "\n\n"; echo '' . htmlspecialchars($post['title']) . "\n"; echo '' . @date("c", $post['date_ts']) . "\n"; echo '' . $blog_base_url . "view-blog-" . $post['id'] . "\n"; foreach (explode(', ', $post['tags']) as $tag) { echo '' . "\n"; } echo '' . "\n"; echo '' . "\n"; echo '\n"; echo "".$post['owner']."\n"; echo "\n"; } echo ''; die();