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 7066507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:05:25+00:00 2026-05-28T05:05:25+00:00

EDIT FIXED by user @jeroen You have to move the li and a tags

  • 0

EDIT FIXED by user @jeroen
You have to move the li and a tags inside the while loop.

Thank you for this, F4LLCON

So the final code (not so clean, but works now):

<?php   
$query = mysql_query("SELECT * FROM `apps` ");
while ($query_row = mysql_fetch_assoc($query))
{
?>
<li>
<?php
$meer = $query_row['TITLE'];
$desc_inject = '';
$sub_string = substr($desc_inject, 0, 200);                             
echo $sub_string." " . '' . '<a href="applink.php?id='.$query_row["ID"].'">' . $meer . '</a>';
?>
</li>
<br />
<?php
}
?>

I want a drop-down menu that will show the TITLES out of my MySQL database.
I know how to do everything concerning the ID etc.

The only problem is that the PHP version of the drop-down menu will SELECT all the TITLES in my database and parse it as ONE link.

So instead of

Home
>About
>Contact
>Another

it will look like

Home
>About
 Contact
 Another 

With other words

Home
>About Contact Another

It will not make multiple drop-down links but only one drop-down link

If you for example do:

<div>
<?php
echo $query_row['TITLE'];
?>
</div>

It will make a individual <div></div> for every TITLE in my database, so I thought this method would also work for the drop-down links..

Does anybody know how to fix it so it will make individual <li></li> for every TITLE?

Here is a normal drop-down menu:

<li id="media"><a href=""></a> 
    <ul>
    <li id="1a"><a href="">About</a></li> 
    <li id="1b"><a href="">Contact</a></li> 
    <li id="1b"><a href="">Another</a></li> 
    </ul>
</li>

And here is the PHP drop-down menu:

<li id="media"><a href=""></a> 
<ul>
<li>
<a href="">
<?php   
$query = mysql_query("SELECT * FROM `apps` ");
while ($query_row = mysql_fetch_assoc($query))
{
echo $query_row['TITLE'];
?>
<br />
<?php
}
?>
</a>
</li>
</ul>
</li>
  • 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-05-28T05:05:26+00:00Added an answer on May 28, 2026 at 5:05 am

    You have to move the li and a tags inside the while loop.

    echo '<li><a href="">' . $query_row['TITLE'] . '</a></li>';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: I have fixed all but two warnings now, so thank you all for
Edit: closing anchor fixed. This issue exists when testing on the following browsers: Google
EDIT : As of 2012-06-11 this bug has been finally fixed! https://bugs.webkit.org/show_bug.cgi?id=35981#c1 I have
Edit : The bug that caused this problem has been fixed. The @version tag
I have a textarea tag that has text I want a user to edit.
I have 100,000 strings each with a fixed ordered index value like this: Index
I have this simple service that broadcasts the current location of the user. I
Edit: this isn't to be a dynamic output, the output view structure is fixed.
Check out this code sample of a button and an anchor: http://jsbin.com/ecitex/2/edit I'm trying
EDIT: I reinstalled MySQL and this fixed itself. No idea what the issue was.

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.