Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8319985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:30:07+00:00 2026-06-08T22:30:07+00:00

I was wondering how I can sort the content in a ordered list set

  • 0

I was wondering how I can sort the content in a ordered list set up using html.
I need to use PHP and mySQL so any tips in this direction will be looked at seriously.

The html for the list

<div id="right-column-sidebar">
<ol>
<li><a href="#">Title 1</a></li>
<li><a href="#">Title 2</a></li>
<li><a href="#">Title 3</a></li>
<li><a href="#">Title 4</a></li>
<li><a href="#">Title 5</a></li>
<li><a href="#">Title 6</a></li>
<li><a href="#">Title 7</a></li>
<li><a href="#">Title 8</a></li>
<li><a href="#">Title 9</a></li>
<li><a href="#">Title 10</a></li>
<li><a href="#">Title 11</a></li>
<li><a href="#">Title 12</a></li>
<li><a href="#">Title 13</a></li>
<li><a href="#">Title 14</a></li>
<li><a href="#">Title 15</a></li>
<li><a href="#">Title 16</a></li>
<li><a href="#">Title 17</a></li>
<li><a href="#">Title 18</a></li>
<li><a href="#">Title 19</a></li>
<li><a href="#">Title 20</a></li>
</ol>
</div>

All of these titles belong to one and the same Category. All tips are welcome!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:30:10+00:00Added an answer on June 8, 2026 at 10:30 pm
    <div id="right-column-sidebar">
    <ol>
    <?php
        $link = mysql_connect("localhost", "root", "password");
        mysql_select_db("db", $link);
    
        $query = "SELECT * FROM table";
    
        $result = mysql_query($query);
    
        while ($row = mysql_fetch_array($results)) :
            ?>
            <li> <a href="#"> <?php echo $row['title']; ?> </a></li>
        <?php endwhile; 
    ?>
    </ol>
    </div>
    

    This all assumes you have some data inside the database db and inside the table table you have a column called title which contains a bunch of entries with titles. This will loop through the results and display them.

    Of course sorting the information just requires some extra info in your query.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm wondering how I can sort mysql data based on the number of entries.
I'm now wondering whether we can make some sort of SSL server based on
I am wondering if I can change the value of io.sort.mb per job? I
I was wondering how can we can use the python module networkX to implement
I was wondering how can I generate the following array using ranges in ruby
I was wondering how can I list the user tables name with its primary
HTML separates content from presentation (by using CSS for presentation and making HTML elements
im wondering, how can I sort my arraylist: its look like this: ArrayList<HashMap<String, ?>>
I'm wondering if I can use a hexadecimal value as delimiter of the Unix
was wondering how can I create a sub drop down box upon selecting a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.