From 8439ed9ba5b36fa382e32ea883a0877d6ec536c0 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Thu, 9 Jun 2011 16:56:39 -0700 Subject: Finished added prices. Added more buttons to the headers. Fixed the categories. --- htdocs/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'htdocs/index.php') diff --git a/htdocs/index.php b/htdocs/index.php index 148cfd6..b09c4bf 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -22,12 +22,17 @@ $posts->query(); if ($posts->valid()) { foreach ($posts as $id => $post) { + $title = $post->getName(); + if ($post->getPrice() != 0) { + $title .= ' - $' . $post->getPrice(); + } + printf("

%s

" . "
%s" . " %s
", - $id, $post->getName(), $post->getLocation(), $post->getAge()); + $id, $title, $post->getLocation(), $post->getAge()); } } else { -- cgit v1.2.3