title: PHP convert date to string
body: <p>I have a date object that I would like to convert to String. I tried looking it up but haven't came up with a good answer. The date is retrieved from a db and it looks like this:</p>
  
  <pre><code>object(DateTime)#1433 (3) {
      ["date"]=&gt; string(19) "2014-06-04 00:00:00"
      ["timezone_type"]=&gt; int(3)
      ["timezone"]=&gt; string(19) "America/Los_Angeles"
  }
  </code></pre>
  
  <p>I need it to just be "2014-06-04" to set as a parameter in another function. How do I convert it to just a string? </p>