I allow myself to ask my question here, because after several hours of trying to make my code work, it still does not work! So I would simply like to check if two times (For example 8:00 and 10:00) are included between a time range (For example between 8:00 and 9:00). I have already tried several combinations, it seems to work from time to time, but when I check if 9:00 and 10:00 is between 8:00 and 9:00, it returns that the time is not included in the time slot when it is supposed to be! Here is my code for the moment: (all data has been transformed into strtotime())
if ((($hdebut >= $ihdebutcours) && ($hdebut <= $ihfincours)) && (($hfin >= $ihdebutcours) && ($hfin >= $ihfincours))) {
$f++;
}
For example :
$hdebut
= 9:00$hfin
= 11:15$ihdebutcours
= 9:00$ihfincours
= 10:00
Thank you very much to the people who will help me, it will help me enormously to continue my project, and sorry for my bad English! Good day to you !