Hi there,
I have the following query:
dbconnect();
$result = mysql_query("SELECT * FROM menu_options");
if(!result)
{
echo mysql_errno(). ": ".mysql_error(). "<br>"; exit();
}
while ($row = mysql_fetch_row($result))
{
echo "<span class=\"menubar\">";
echo "<a href=" . $row[2] . ">" . $row['1'] . "</a><br>";
echo "</span>";
}
This gets me the items for a menubar, but they are all non-ordered, I'd like to order them by the length of their text.
A sample code will be much appreciated.
Thank you.