samedi 25 juin 2016

IF statement with multiple expressions

I'm trying to construct IF statement with multiple conditions but I can't get echo 'TRUE' with this PHP code.

<?php
$totalDays = 4;
$startDateL = 'Friday';
$endDateL = 'Monday';
$pickupTime = '12:00:00';
$returnTime = '9:00:00';

if($totalDays == 4 AND 
$pickupTime == '12:00:00' AND 
$returnTime == '09:00:00' AND 
$startDateL == 'Friday' AND 
$endDateL == 'Monday') {
   echo 'TRUE';
}
?>

Aucun commentaire:

Enregistrer un commentaire