Search code examples
phphtmldatesmarty

Establishing current date in HTML form


how can I show current date as default? my page is showing "january 2006" because I use another code that lists date for last 10 years.


Solution

  • You should try $fromDate = new DateTime(); $toDate = new DateTime();