<!DOCTYPE html>
<head>
<title>Gallary</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="css/magnific-popup.css" rel="stylesheet">
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css">
</head>
<body style="background-color:white;">
<div class="content-container" >
<header>
<!--<h1 class="center-text">Gallary at glance</h1>-->
</header>
<div id="portfolio-content" class="center-text">
<div class="portfolio-page" id="page-1">
<div class="portfolio-group">
<a class="portfolio-item" href="images/1-large.jpg">
<img src="images/1-small.jpg" alt="image 1">
<div class="detail">
<h3><b>155 USD</b></h3>
<p>Товар 1</p>
<span class="btn">View</span>
</div>
</a>
</div>
<div class="portfolio-group">
<a class="portfolio-item" href="images/2-large.jpg">
<img src="images/2-small.jpg" alt="image 2">
<div class="detail">
<h3>155 USD</h3>
<p>Товар 2</p>
<span class="btn">View</span>
</div>
</a>
</div>
<div class="portfolio-group">
<a class="portfolio-item" href="images/3-large.jpg">
<img src="images/3-small.jpg" alt="image 3">
<div class="detail">
<h3>155 USD</h3>
<p>Товар 3</p>
<span class="btn">View</span>
</div>
</a>
</div>
<div class="portfolio-group">
<a class="portfolio-item" href="images/4-large.jpg">
<img src="images/4-small.jpg" alt="image 4">
<div class="detail">
<h3>155 USD</h3>
<p>Товар 4</p>
<span class="btn">View</span>
</div>
</a>
</div>
//И так далее...
</a>
</div>
</div> <!-- page 3 -->
<div class="pagination">
<ul class="nav">
<li class="active">1</li>
<li>2</li>
<li>3</li>
</ul>
</div>
</div>
</div> <!-- /.content-container -->
foreach($bd_mass as $val) { ?>
<div class="portfolio-group">
<a class="portfolio-item" href="<?php echo $val['image-large']; ?>">
<img src="<?php echo $val['image-small']; ?>" alt="image 1">
<div class="detail">
<h3><b><?php echo $val['cy']; ?> USD</b></h3>
<p><?php echo $val['name']; ?></p>
<span class="btn">View</span> //это че за жесть span-кнопка? Либо button либо a надо в зависимости от действия её
</div>
</a>
</div>
<?php } ?>