Does anyone have any ideas how to sort an array within a while loop...for instance:
while ($row = mysql_fetch_array($result))
{
if (($row['date']==$cal_date)) // && ($row['description']!= "") )
{
print "<td class='tcell' bgcolor=#CCCCCC valign=\"top\" height=\"100\">$d<br>$row[description]</td>"; break;
}
else
{
print "<td class='tcell' bgcolor=#CCCCCC valign=\"top\" height=\"100\">$d<br>no info<br>$cal_date<br> ".$row["date"]."</td>";
}
}
Where would I add arsort($row[description])?
Comment: What I am trying to accomplish really is to sort the array by date and then by description...for instance if a date contains four rows, it would display the one with a description first (there will only be one with a description per date)...