Date And Time – PHP Basics

Date And Time – PHP Basics

Date And Time – PHP Basics

In PHP to format a date or a time, ‘date( )’ function is used. This function makes time and date easy to read. Commonly used characters for dates : d, m, y, l (small L). Here, ‘d’ represents day, ‘m’ represents month, ‘y’ represents year and ‘l’ represents day of week.
And for additional formatting characters such as :- [ “/”, “.”, or “-” ] can be used.

SIMPLE DATE FORMAT


 

"; echo "Today is " . date("l"); ?>

Output :

 

 

 

Copyright Year (Auto)


 

© 2010- F5Craft.in

Output :

 

 

 

Normal Time


 

Output :