title: Script for dated discount
body: <p>I'm a little new at PHP, so my script writing is still progressing. I have a page that users register for a seminar they have to pay for.  If they register prior to 5 days before the seminar takes place, they get a discounted price, if they register post 5 days before the seminar takes place, they have to pay full price.  I have written a PHP script that I think will do that (works is testing anyway) but I have a feeling there is a better way of writing it.  I am just looking for any suggestions anyone has, if any.  Your help is greatly appreciated.  My script is as follows.</p>
  
  <pre><code>date_default_timezone_set('MST');
  $discount_check  = date("YmdHis", mktime(date("H"), date("i"), date("s"), date("m") , date("d")+5 , date("Y") ));
  
  //Made an array because there are several seminars a year and because I need to make it easy enough for others in my office (who don't know PHP) to add/edit seminar dates
  $array = array(
  'Utah_seminar' =&gt; '20120130153804',
  'Seattle_seminar' =&gt; '20120723000000',
  'Florida_seminar' =&gt; '20121005000000'
  );
  
  while ($seminar_dates = current($array)) 
  {
      if ($discount_check &gt;= $seminar_dates) 
      {
          echo 'discount is not eligible';
          break;
      }
      else
      {
          echo 'discount received';
          break;
      }
  next($array);
  }
  </code></pre>
  
  <p>Again, any help is greatly appreciated.  Even if it's finding any hiccups with the code.</p>