require_once("classes/config.php");
$db = db::instance();
$getBlogs = $db->query("SELECT * FROM blogs ORDER BY date_added DESC");
$numRows = $getBlogs->num_rows;
while($row = $getBlogs->fetch_assoc()) {
$url = $row['url'];
$thumb = $row['thumb'];
$summary = $row['summary'];
$title = $row['title'];
$date_added = date("M d, Y", strtotime($row['date_added']));
$counter++;
if($counter == $numRows) {
$add_end = "last";
} else {
$add_end = "";
}
$blog_results .= '