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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:45:50+00:00 2026-06-13T10:45:50+00:00

I have a php web site, and here I need to create a page

  • 0

I have a php web site, and here I need to create a page to enter exam details of a student. There are 5 Subject in one exam. Each subject has exam date, starting time and end time

I.e.

Date: 02-nov-2012 
Start time: 2.30 pm
End time: 4.30 pm 

I have to check the duplication of the exam date time….i.e. any other subjects which don’t have the similar date time also if one subject has

Exam Date:  02-nov-2012 
Start time: 3.00.pm 
End date: 5.00 pm 

Must be avoided. It’s invalid
Another subject has

Exam Date:  02-nov-2012 
Start time: 9.00.am 
End date: 2.00 pm 

It’s a valid

I think it’s clear… I don’t know to explain further in details….
I don’t know to validate this 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-06-13T10:45:51+00:00Added an answer on June 13, 2026 at 10:45 am
    $errors = array();
    
    for ($i = 0; $i < count($exams); $i++) {
      for ($j = $i+1; $j < count($exams); $j++) {
        if (($exams[$j]['start_time'] >= $exams[$i]['start_time'] && ($exams[$j]['start_time'] <= $exams[$i]['end_time']) ||
            ($exams[$j]['end_time'] >= $exams[$i]['start_time'] && ($exams[$j]['end_time'] <= $exams[$i]['end_time'])) {
          $errors[] = "<li>Exams $i and $j overlap.</li>";
        }
      }
    }
    
    if ($errors) {
      echo "There were conflicts:<br><ul>\n ", join("\n ", $errors), "\n</ul>\n";
    } else {
      echo "Congratulations, no conflicts!\n";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WordPress site that I need to create a custom PHP page
I am developing w php web site. Here I have set a php cookie
I am developing a php web site. Here I have implemented clean URL using
I have develop one web site in php. I know how to upload it
I have implemented the jquery scroll text in my php web site. See my
I have two questions. I want to send SMSes from a web-site in PHP
On my web site I would like to have several sub-domains. Files that create
I need to create sort of a flter for videos. one dropbox selects number
I have the task to build a web-site for a smaller non-profit organization. I
I have a text editor on my web page, on that text editor i

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.