I have a query (SELECT id, title, date FROM mytab ORDER BY date DESC LIMIT 0,8) that print the last 8 articles.
Now, if 7 days are passed from the last title, the last title is printed with image1 and remainents 7 titles print with image2. I've try this code but don't work:
echo "<tr><td><a href=\"show.php?id=$row[id]\">".($row[date] > date(d/m/y, strtotime("+7 day")) ? "<img src=image1.gif">" : "<img src=image2.gif>" )." $row[title]</a>";
Help me, please. bye 😉