PHP Code:
<?php
$con = mysql_connect("*****","*****","*****");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("*****", $con);
$result = mysql_query("SELECT * FROM info ORDER BY id DESC");
$dateChk = 0;
while($row = mysql_fetch_array($result))
{
$date = $row["date"];
$liclass = $row["class"];
$url = $row["url"];
$title = $row["title"];
$comment = $row["comment"];
echo "<ul>";
If($dateChk != $date)
{
echo "$date<br><li class='$liclass'><a href='$url' target='_blank'>$title</a>.<br /> $comment </li><br>";
echo "\n";
}
else
{
echo "<li class='$liclass'><a href='$url' target='_blank'>$title</a>.<br /> $comment </li><br>";
echo "\n";
}
$dateChk = $date;
}
mysql_close($con);
?>
<?php
echo '</ul>';
?>
Basically it is your code itself. I've only introduced a new variable
if you check the while condition and the if statement in it you'll get the correct idea.
Though i haven't checked but if your code is working then this should also work.
Bookmarks