title: PHP - Get next draw date (Lottery)
body: <p>I am planning to make a lottery with PHP.
  Now I want to output the next draw date with PHP.</p>
  
  <p>The draw should start every Thuesday and thursday at 7 PM,
  and now I want to output the next draw date for the client:</p>
  
  <p>Monday,Friday,Saturday,Sunday - Next draw date is Thuesday </p>
  
  <p>Thuesday - Next draw date is Thuesday (today) if it is not 7 PM otherwise the next draw date is thursday.</p>
  
  <p>Wednesday - Next draw date is the thursday</p>
  
  <p>thursday - Next draw date is thursday (today) if it is not 7 PM otherwise the next draw date is Thuesday .</p>
  
  <p>Now I want to create an if-Statement which prints out the correct date for every condition - for example for Wednesday the next date for Thursday and so on.</p>
  
  <p>I really tried it serveral times but it is always a mess and not working.</p>
  
  <p>Edit:
  Is it working like that?</p>
  
  <pre><code> if(date('D') == "Tue" &amp;&amp; new DateTime() &lt; new DateTime("19:00:00")){
      //Dienstag
      return date('F j , Y');
  
  }elseif(date('D') == "Tue" &amp;&amp; new DateTime() &gt; new DateTime("19:00:00")){
      //Donnerstag
      return date('F j , Y', strtotime('next thursday'));
  
  
  }elseif(date('D') == "Thu" &amp;&amp; new DateTime() &lt; new DateTime("19:00:00")){
      //Donnerstag
      return date('F j , Y');
  
  }elseif(date('D') == "Thu" &amp;&amp; new DateTime() &gt; new DateTime("19:00:00")){
      //Donnerstag
      return date('F j , Y', strtotime('next tuesday'));
  
  
  
  }elseif(date('D') == 'Mon' || date('D') == 'Fri' || date('D') == 'Sat' || date('D') == 'Sun') {
      //Dienstag
      return date('F j , Y', strtotime('next tuesday'));
  
  
  } elseif(date('D') == 'Wed') {
      //Donnerstag
      return date('F j , Y', strtotime('next thursday'));
  }
  </code></pre>