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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:51:16+00:00 2026-05-25T19:51:16+00:00

I am working on redesigning a somewhat poorly designed system and have run across

  • 0

I am working on redesigning a somewhat poorly designed system and have run across the following issue.
I have a time field where the user can select the hour, minute, and time zone for an event. These are done with an HTML select drop down menu with several different options. My predecessor felt it necessary to enable people to select an exact minute whereas in my particular application 15 minute increments will suffice, (not to mention make the list about a million times easier to navigate through for the users).

The issue I have is this, if an event was created to occur at say 1:17 PM previously but 17 is no longer in my minute drop down menu It will display the default –select– option. But I would prefer that in these cases the 17 appear in the menu and be selected as the default. My issue is I don’t know how exactly to check if my minute value already exists in the list, and then add it if it isn’t. I suppose I could be creating a PHP array in parallel with my drop down options, but I would prefer to be able to look directly at the list of options and determine if the value is already there, if so move on, if not add it to the end. Is there a way to get this kind of information from an HTML object in PHP?

  • 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-25T19:51:16+00:00Added an answer on May 25, 2026 at 7:51 pm

    No you can’t access this information from PHP. Only thing you could do is to buffer the html you are sending and then use DOM to access the drop down. But I suggest you use a php array, just as you mentioned, and create the drop down from it.

    $values = array(0,15,30,45);
    if(!in_array($values, $minute)) {
        $values[] = $minute;
    }
    
    // Generate select box..
    [...]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am java / grails developer working on redesigning a software system. One of
Working on a project at the moment and we have to implement soft deletion
Working on a somewhat complex page for configuring customers at work. The setup is
Working on a project where a sequential set of methods must be run every
Our team is currently working on completely redesigning our school's website and one of
We are working on a large legacy application and we're redesigning the business layer
I have a pretty large social network type site I have working on for
I have written a simple, working tetris game with each block as an instance
I have been trying to get slimv (http://www.vim.org/scripts/script.php?script_id=2531) working for a while now, but
I'm working on an application developed using Zend Framework. I have defined relationships in

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.