<?php
$articles = [
'1' => [
'id' => 1,
'title' => 'title 1',
'content' => 'content 1'
],
'2' => [
'id' => 2,
'title' => 'title 2',
'content' => 'content 2'
],
'3' => [
'id' => 3,
'title' => 'title 3',
'content' => 'content 3'
]
];
?>
<!DOCTYPE html>
<html lang="en">
<body>
<div class="articles">
<? foreach ($articles as $id => $article): ?>
<div class="article">
<h3><?=$article['id']?></h3>
<a href="article.php?id=<?=$id?>">Read more</a>
</div>
<? endforeach; ?>
</div>
</body>
</html>