
Почему он выдаёт ошибку?
<?php
function articles_all() {
$art1 = ["id" => 1, "title" => "Title1", "date" => "2015-01-01", "content" => "Content1"]; На этой строке ошибка
$art2 = ["id" => 2, "title" => "Title1", "date" => "2015-01-01", "content" => "Content1"];
$arr[0] = $art1;
$arr[1] = $art2;
return $arr;
}
function articles_get($id) {
}
function articles_new($title, $date, $content) {
}
function articles_edit($id, $title, $date, $content) {
}
function articles_delete($id) {
}
require_once("database.php");
$articles = articles_all();
?>
<!DOCTYPE html>
<html>
<head>
<title>Blog</title>
</head>
<body>
<div>
<?php foreach($articles as $a): ?>
<div class="article">
<h3>
<a href="articles.php?id=<?$a['id']?>"><=?$a['title']?></a>
</h3>
<em>Опубликовано: <?=$a['date']?></em>
<p><?=$a['content']?></p>
</div>
<?php endforeach ?>
</div>
</body>
</html>




