How to use PHP & Getdate() This function will be using PHP and using function Getdate()
ShotDev Focus:
- Using function Getdate()
Example
php_getdate.php
<html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <?php $today = getdate(); echo "Day = ".$today["mday"]."<br>"; echo "Month = ".$today["mon"]."<br>"; echo "Year = ".$today["year"]."<br>"; echo "<hr>"; foreach($today as $key => $value) { echo "Key: $key; Value: $value<br>"; } ?> </body> </html>
Create a php file and save to path root-path/myphp/
Run
http://localhost/myphp/php_getdate.php
Screenshot