<!DOCTYPE html>
<html>
    <head>
        <?php 
$logo = "video.png";
$title = "Видеокурсы";
require_once 'blocks/head.php';
require_once 'functions/functions.php';
$page = htmlspecialchars($_GET['page']);
$sourseDB = "courses";
$pageSize = 5;
$itemsNum = getItemsNum($sourseDB);
$courses = getList($sourseDB, $page, $pageSize);
?>
    </head>
    <body>
        <?php 
$header = "Видеокурсы";
require_once 'blocks/header.php';
?>
        
        <section>
            <?php 
for ($i = 0; $i < count($courses); $i++) {
    echo '<a name="course' . $i . '"></a>
                        <article>
                            <h2>' . $courses[$i]["title"] . '</h2>
                            <img src="/img/courses/course_' . $courses[$i]["id"] . '.jpg" />
                            <p><b>Автор / Канал:</b> ' . $courses[$i]["author"] . '</p>
                            <p>' . $courses[$i]["info"] . '</p>
                            <a href="' . $courses[$i]["url"] . '" target="_blank">
Example #2
0
<!DOCTYPE html>
<html>
    <head>
        <?php 
$logo = "computer.png";
$title = "Библиотека кодера";
require_once 'blocks/head.php';
require_once 'functions/functions.php';
$books = getList("books", 1, 5);
$courses = getList("courses", 1, 5);
$sites = getList("sites", 1, 5);
$booksNum = getItemsNum("books");
?>
    </head>
    <body>
        <?php 
$header = "Библиотека кодера";
require_once 'blocks/header.php';
?>
        <section>
            <article>
                <a href="books.php?page=1">
                    <h1>Последние добавленные книги</h1>
                </a>
                    <?php 
$stringNum = count($books);
if ($stringNum > 5) {
    $stringNum = 5;
}
for ($i = 0; $i < $stringNum; $i++) {
    echo '<a href="books.php?page=1#book' . $i . '">