Satisfy 3 conditions in a If/Else statement php page

785 views Asked by At

I need to satisfy 3 different conditions in an if/else statement that require_onces a file in a specific folder My problem is that when my page is loaded my function satisfy only two conditions. I'd like to know if there's a better method to define this function:

     if ($sel_year <= '2016') {
          if ($sel_month >= '09') {
              require_once 'tab2.php';
              if ($sel_month <= '08') {
                  require_once 'tab1.php';
              } else require_once 'tab3.php';
          }
     }

Thank you so much for your help

0

There are 0 answers