title: How to change the date format in a drop down menu
body: <pre><code>$sessionquery = "
  SELECT SessionDate
  FROM Session
  ";
  
  $sessionqrystmt=$mysqli-&gt;prepare($sessionquery);
  // You only need to call bind_param once
  
  $sessionqrystmt-&gt;execute(); 
  
  $sessionqrystmt-&gt;bind_result($dbSessionDate);  
  
  
  
  $sessionHTML = '&lt;select name="session" id="sessionsDrop"&gt;'.PHP_EOL;
  $sessionHTML .= '&lt;option value=""&gt;Please Select&lt;/option&gt;'.PHP_EOL;           
  
  while ( $sessionqrystmt-&gt;fetch() ) {
      $sessionHTML .= sprintf("&lt;option value='%s'&gt;%s&lt;/option&gt;", $dbSessionDate) . PHP_EOL;  
  }
  </code></pre>
  
  <p>Above I have a drop down menu where it displays a Session's Date. At the moment the date is formatted so it looks like this:</p>
  
  <pre><code>2012-03-23
  </code></pre>
  
  <p>I want it to be formatted as below:</p>
  
  <pre><code>23-03-2012
  </code></pre>
  
  <p>How can I change the date format in the drop down menu?</p>