In this lesson we will talk about php date time and how to use time and date in php, we will use a function
called date and this function require three or six parameters days,months,years,hours,minutes,seconds
<?php
echo date("D/M/Y H:i:s");
?>
And the result is
As you see D for days, M for months and Y for years, H for hours, i for minutes and s for seconds
Now let's use lowercase letters
<?php
echo date("d/m/y h:i:s");
?>
And the result is
I think you understand the difference, but if you notice I let i and s lowercase why? try it and you will know
This was the php date time I hope you understand it.
See you next time.
No comments :
Post a Comment