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

  • Home
  • SEARCH
  • 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 7858557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:30:19+00:00 2026-06-02T21:30:19+00:00

Inside list.php , I have a huuuuge list of <option> elements all written correctly.

  • 0

Inside list.php, I have a huuuuge list of <option> elements all written correctly.
On page.php, I’m trying to use <?php include ('path/to/list.php'); ?> inside a <select> element. When the page loads, the select element is present but none of the options load in.

The full setup:

<select>
    <?php include('php/list.php'); ?>
</select>

And then list.php:

<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
...
<option>Option 150</option>

I understand that text elements do not render inside select nodes, however shouldn’t this work as intended?

EDIT
So after much deliberation and about an hour spent trying to figure out why simple PHP wasn’t working, the answer is: make sure you’re typing in the full path to your file. Keeping this question up so that future users can view a few different methods of accomplishing this.

  • 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-02T21:30:20+00:00Added an answer on June 2, 2026 at 9:30 pm

    That’s impossibile considering your list.php has HTML (HTML gets automatically outputted leaving ob_* function). You have some errors elsewhere..

    Try require so you can see a fatal error if it fails

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

Sidebar

Related Questions

I'm trying to use PHP's Glob to get a list of files based on
I have a page which has a drop list inside a form. The drop
I'm doing MVC in PHP, and i'd like to have a list() method inside
I have a piece of code where inside a list monad, a function is
I have a class that holds another objects inside it (List, Set and objects
I am trying to add events on my buttons inside a list, but it
I have the following function defined inside my linked list class. The declaration in
I have a PHP file with PHP Variables inside. Example: Hi <?=$username?>, Can you
I have a select list like the following inside of a form. <select name=0[voicemail]
I have a list with images which I display from db like this: <?php

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.