{% $topHome = array(); $last4HomeQuery = $db->query("select articles.id, articles.category_id, articles.slug as slug, articles.title as title, articles.excerpt as excerpt, articles.image as image, articles.created as created, authors.name as authorname, authors.linkedin as linkedin, authors.slug as authorslug, categories.name as category_name, categories.slug as category_slug from articles, authors, categories where articles.author_id = authors.id and articles.category_id = categories.id ORDER BY articles.created DESC limit 0,4"); while($last4HomeArticles = $last4HomeQuery -> fetchArray(SQLITE3_ASSOC)){ $topHome[] = $last4HomeArticles; } %}
image
{{ $topHome[0]['category_name'] }}

{{ $topHome[0]['title'] }}

{{ $topHome[0]["authorname"] }} / {{ date("d F, Y", strtotime($topHome[0]['created'])) }}
image
{{ $topHome[1]['category_name'] }}

{{ $topHome[1]['title'] }}

{{ date("d F, Y", strtotime($topHome[1]['created'])) }}
image
{{ $topHome[2]['category_name'] }}

{{ $topHome[2]['title'] }}

{{ date("d F, Y", strtotime($topHome[2]['created'])) }}
image
{{ $topHome[3]['category_name'] }}

{{ $topHome[3]['title'] }}

{{ date("d F, Y", strtotime($topHome[3]['created'])) }}