PHP code to find the current year,current month and current day

PHP have date function get all the information related to date here we have to search find out PHP code to find the current year,current month and current day , current year,current month and current day can be easily find out using date() function let me check how to do it

php code to find current year


<?php

echo date('Y');  //Capital Letter Y

Out Put

2019

?>

<?php

echo date('y');  //Small letter y

Out Put

19

?>

php code to find current month


<?php

 echo date('M');  

Out Put

Jul

?>

<?php

 echo date('m');  

Out Put

07

?>

php code to find current day

 


<?php

 echo date('D');  

Out Put

Mon

?>

<?php

 echo date('d');  

Out Put

08

?>

My Thought

Your email address will not be published. Required fields are marked *

Our Tool : hike percentage calculator