How to use PHP & Get Date and date_parse() This function will be using PHP and using function date_parse()
ShotDev Focus:
- PHP & date_parse()
Example
php_date_parse.php
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<?php
$strDate = date_parse("2010-12-12 10:50:45");
echo $strDate["year"]."<br>";
echo $strDate["month"]."<br>";
echo $strDate["day"]."<br>";
echo "<hr>";
foreach($strDate as $key => $value) {
echo "Key: [$key] Value= $value<br>";
}
?>
</body>
</html>
</br>
Create a php file and save to path root-path/myphp/
Run
http://localhost/myphp/php_date_parse.php
Screenshot


