From 2ae22c4a438dc3c1822b8d909a4b38a211427bee Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Sat, 5 Jun 2021 11:57:12 -0600 Subject: Use different syntax for conditions in HTML --- viewcategory.php | 71 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 36 deletions(-) (limited to 'viewcategory.php') diff --git a/viewcategory.php b/viewcategory.php index e68bab2..e9927f9 100644 --- a/viewcategory.php +++ b/viewcategory.php @@ -18,40 +18,39 @@ if (!$current->has_value()) { ?> -
-= $current->description; ?>
-= $current->thread_count . ' threads, ' . $current->post_count . ' posts'; ?> -Thread Name | -Latest Post | -|
---|---|---|
' . $thread->subject . ''; - echo ' by ' . $thread->author->name . ' on ' . date('M d, Y', strtotime($thread->date_created)) . ' | '; - - if (!is_null($latest_post)) { - echo 'by ' . $latest_post->author->name . ' on ' . $latest_post->date_created . ' | '; - } else { - echo 'No posts yet! | '; - } - - echo '
= $current->description; ?>
+ = $current->thread_count . ' threads, ' . $current->post_count . ' posts'; ?> +Thread | +Author | +Date | +Latest Post | +|
---|---|---|---|---|
+ = $thread->subject ?> + | += $thread->author->name ?> | += $thread->date_created ?> | +get_latest_post(); if ($latest_post->has_value()): ?> +by = $latest_post->author->name ?> on = $latest_post->date_created ?> | + +No posts yet! | + +