title: PHP - Convert separate day, month, and year to mysql date format
body: <p>I have a day value (1-31), a month value (1-12), and a year value, and i need to save them in my MySQL database date format.</p>
  
  <p>How can i convert those values (3 integers corresponding to the day, month, and year) to a date format to save it in my database?</p>
  
  <pre><code>$day = $request-&gt;day;     // day(1-31)
  $month = $request-&gt;month; // month(1-12)
  $year = $request-&gt;year;  // year
  
  $date = strtotime("$year-$month-$day"); // how to convert above values to a MySQL **date** format?
  </code></pre>