-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path15.php
More file actions
29 lines (22 loc) · 817 Bytes
/
15.php
File metadata and controls
29 lines (22 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php // Manipulação de data e hora
$dia = date("d");
$mes = date("m");
$ano = date("Y");
$meses = array( "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro","Dezembro");
$hora = date("h"); // h: 12 horas - H: 24 horas
$minuto = date("i");
$segundo = date("s");
echo $dia." de ".$meses[$mes - 1]." de ".$ano."<br/>";
echo $hora.":".$minuto.":".$segundo;
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>15 aula de PHP - Manipulação de data e hora</title>
</head>
<body>
</body>
</html>