heres my script that doesn't work, the line that doesn't work in the sort() line included are 2 dif datafields at hte bottom
$result = mysql_query("SELECT catagory,part_number,description,retail FROM inventory WHERE catagory LIKE '%$catagory%' AND description LIKE '%$description%'")or die(mysql_error());
echo "<table border=\"0\" cellspacing=\"5\" cellpadding=\"2\">\n";
echo "<tr><td><b><u><font face=\"arial\" size=\"3\">Part Number</font></u></b></td><td><b><u><font face=\"arial\" size=\"3\">Year, Make and Model</font></u></b></td><td><b><u><font face=\"arial\" size=\"3\">Price</font></u></b></td></tr>\n";
while ($myrow = mysql_fetch_row($result)) {
sort ($myrow[2]);
printf("<tr><td><font face=\"arial\" size=\"3\">%s</font></td><td><font face=\"arial\" size=\"3\">%s</font></td><td><font face=\"arial\" size=\"3\">%s</font></td></tr>\n",
$myrow[1], $myrow[2], $myrow[3]);
}
here is an example of 2 dif inputs in the $myrow[2] row
2004 ARCTIC CAT F6 FIRECAT
2002 Z570 (GREEN)
what command should i use to sort those by year