Example #1
0
<body>
<form action="./index.php" method="get">
    <input type="number" name="limit" id="limit" value="<?php 
echo $limit;
?>
">
    <input type="submit" value="OK">
</form>
<?php 
$i = 0;
foreach ($news as $item) {
    ?>

    <section>
        <img class="news-all-thumb" src=".<?php 
    echo News_check_image($item['image']);
    ?>
">
        <h2><?php 
    echo ++$i;
    ?>
. <a href="post.php?id=<?php 
    echo $item['id'];
    ?>
"><?php 
    echo $item['title'];
    ?>
</a></h2>
        <p><?php 
    echo News_cut_text(nl2br($item['text']), 202);
    ?>
Example #2
0
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<h1><?php 
echo $post['title'];
?>
</h1>
<img src=".<?php 
echo News_check_image($post['image']);
?>
">
<p><?php 
echo nl2br($post['text']);
?>
</p>
<a href="./index.php">Главная</a> <a href="./new.php">Новая</a>
</body>
</html>