Here's one way to do it:
Let's say you added a a new article to your news article table and the date added is: 2003-03-02 12:10:23. Assume the 'dateadded' field is the 'datetime' data type.
Do your output, then do something like this in the while loop:
[FONT=courier new]
while ([some code here ]){
if(){
// do some kind of comparison here
}
}
[/FONT]
But, it might be cleaner to do it in the SQL query. Let's say you have this query:
[FONT=courier new]
$sql = "
SELECT
id,
title,
body,
dateadded,
(.............................)
FROM articles
limit 10 order by dateadded
";
[/FONT]
the big blank, (.............................) is where you can use a function to compare dates and it will return 1 or 0. Refer to they MySQL manual for what I'm talking about.
Then use the 1 or 0 to decide whether to display the NEW image.