So I am creating a new RSS feed that takes contents from two different mysql tables. I am using the following code
$query = "select dateline, url, title, description,rssdate from `articles` WHERE pagenumber='1' ORDER by id DESC limit 15";
$result = mysql_query($query, $dbh);
while ($line = mysql_fetch_assoc($result))
{
$return[] = $line;
}
$query2 = "select dateline, link_url, title, category, rssdate from `rotator` WHERE category='movie' ORDER by id DESC limit 5";
$result2 = mysql_query($query2, $dbh);
while ($line2 = mysql_fetch_assoc($result2))
{
$return[] = $line2;
}
I want to have the resulting array ($return) sorted by "dateline" (which is a number that organizes the dates of each item). Now how do I go about sorting this array?
Thanks