WRITE YOUR OWN BLOG ENGINE The results are (Shared web hosting)
WRITE YOUR OWN BLOG ENGINE The results are finally ordered by year and then month. Skipping through the code to the posts div:
Archive
The textual value of the month and year is inserted in the heading. \n”; do { $post_id = $myposts[”post_id”]; $title = $myposts[”title”]; $summary = $myposts[”summary”]; echo “
\n”; echo “
\n”; } while ($myposts = mysql_fetch_array($result)); echo “
“; } break; If showbymonth is true, the familiar do-while loop is executed to display a list of posts for the selected month. case false: $previousyear = “”; if($myposts) { do { $year = $myposts[”year”]; $month = $myposts[”month”]; $monthyear = $myposts[”monthyear”]; $count = $myposts[”count”]; if ($year != $previousyear) { if ($previousyear != “”) { echo “
\n”; } echo “
$year
“; echo “
- \n”; $previousyear = $year; } 323