Просмотр поста

.
Str@nnik

Tor, держи тогда такой вариант

$total_texts = mysql_result(mysql_query("select count(*) from `library_texts`"), 0);
if ($total_texts) {
$limit = 3;
$req = mysql_query("select * from `library_texts` order by `time` desc limit $limit");
$i = 0;
while ($res = mysql_fetch_assoc($req)) {
echo $i % 2 ? '<div class="list1">' : '<div class="list2">';
echo '<b>' . functions::checkout($res['name']) . '</b>&nbsp;<span class="gray">(' . functions::display_date($res['time']) . ')</span>
<br />' . functions::checkout($res['announce']) . '&nbsp;<a href="library/index.php?id=' . $res['id'] . '">>></a>';
echo '</div>';
$i++;
}
}