<?php
$sql = "SELECT * FROM kino WHERE janr='$janr_search' ORDER BY RAND() LIMIT 4";
$result = $db->query($sql);
while($row = $result->fetch(PDO::FETCH_ASSOC)) {
echo "
<div class='kinko1a'>
<a class='link11' href='index_films.php?id={$row['id']}'>
<div class='link111'>
{$row['images']}
{$row['title']}
</div>
</a>
</div>
";
}
?>