Try with the below code. Some examples of date() formatting. Every array has an internal pointer to its "current" element, which is … :D that's great, Podcast 296: Adventures in Javascriptlandia. So here is the complete step by step tutorial with different arguments of date method for How to get current Date in php with Month,Year,Day format. In what way would invoking martial law help Trump overturn the election? So i added all examples, you can see and use it that you need or requirement for your project. Then you can easily check it by if conditions as mentioned in the code below: Thanks for contributing an answer to Stack Overflow! In what way would invoking martial law help Trump overturn the election? Is it safe to define more than 120 signs? $year; ?> Output: Current year is: 2014 PHP’s date () function can let you know date and time related information based on the formatting string it takes in its first parameter. Reference — What does this symbol mean in PHP? the code seem not working? Author Topic: Echo current Month or current Year into field value (Read 105983 times) To retrieve the year using a particular calendar, you can call that calendar's GetYear method, as the following code shows. I have got two arrows set up, click for next day, next two days, soon and previous day, two days ago, soon. Why do real estate agents always ask me whether I am buying property to live-in or as an investment? From PHP 5.2, PHP provides some ready-made classes to help developers to solve daily problems they face. Use the format character “Y”(Capital letter) in the date() function to display the current year. A very common feature of forms is the dropdown