<?php foreach($videos as $v): ?>
<ul>
<li>
<div class="videos_image">
<a href="shablon.php?id=<?php echo $v['id']; ?>"><img src="/media/images/<?php echo $v['img']?>" width="250" height="180" alt="<?php echo $v['title']?>" /></a>
<div id="videos_image">
<img src="/media/views.png" id="views" />
<span class="videos_views"><?php echo $vidos['views'] ?></span>
</div>
</div>
<?php
if (empty($videos)) die('В базе нет никаких картинок или запрос кривой');
?>
<div class="videos_title">
<span class="title_alt"><?php echo mb_substr($v['title'], 0, 26, 'utf-8') . '...';?> </span>
</div>
</li>
</ul>
<?php endforeach?>
<?php
$shablon = mysqli_query($connection, "SELECT * FROM `videos` WHERE ");
$vidos = mysqli_fetch_assoc($shablon);
?>