Здравствуйте. Почему второй цикл ничего не выводит?
header('Content-Type: text/html; charset: utf-8;');
$link = mysql_connect('localhost', 'root', '')
or die('unable to connect to mysql server: ' . mysql_error());
$db_selected = mysql_select_db('tutorial', $link);
if (!$db_selected) {
die('Не удалось выбрать базу tutorial: ' . mysql_error());
}
$result = mysql_query('SELECT * FROM articles WHERE id_gallery = 2');
<?php while($row = mysql_fetch_array($result)) :?>
<div class="wrap">
<h3><?php echo $row['id'] . ') ' . $row['title']; ?></h3>
<p><?php echo $row['summary']; ?></p>
</div>
<?php endwhile; ?>
<?php while($row = mysql_fetch_array($result)) :?>
<div class="wrap">
<h3><?php echo $row['id'] . ') ' . $row['title']; ?></h3>
<p><?php echo $row['summary']; ?></p>
</div>
<?php endwhile; ?>