Do my coding PHP assignment - Assignment Expert...
2. Write PHP program to display current date and display using getdate() function.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Date</title>
</head>
<body>
<?php
$date_array=getdate();
foreach($date_array as $key=>$val){
echo $key."=".$val."</br>";
}
echo "<h1>Today's date:".$date_array['mon']."/".$date_array['mday']."/"
.$date_array['year']."</h1>";
?>
</body>
</html>
Comments
Post a Comment