web 2.0

How to use PHP & Getdate()

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

PHP Getdate()
.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.