Hello,
In a array ( [0] => url [1] => head [2] => source [3] => time ). I want to output only the latest articles (from the array key "time").
The script currently outputs all articles with their dates and times. A sample output of a value from the key "time" looks like this:
Sep 22 2002 12:21 p.m.
(the date and time are toghther)
I am not sure which PHP function(s) to use, to do what I want. Which is basically compare the date (month and day) in the array to the current date (using date("M d"); ) to filter out the any old articles.
I've seen in_array, and array_search, in the manuals, but don't think they'll work.
{Statements Needed Here}
{Then do the following if true}
$temp["time"] = preg_replace ("/AM/", " a.m.", $temp["time"]);
$temp["time"] = preg_replace ("/PM/", " p.m.", $temp["time"]);
echo "<a href=\"".$temp["url"]."\" target=\"_blank\">".$temp["head"]."</a>\n<br>\n";
echo "<font size='2'>[".$temp["source"]."] - ".$temp["time"]."</font>\n<br>\n<br>\n\n";
}
Any ideas