0
I want to take the date in full. The code below is getting right, however, the current date of the computer.
I would like it to be as I put the date coming from a variable type 01/09/2017.
<?php
$meses = array (1 => "Janeiro", 2 => "Fevereiro", 3 => "Março", 4 => "Abril", 5 => "Maio", 6 => "Junho", 7 => "Julho", 8 => "Agosto", 9 => "Setembro", 10 => "Outubro", 11 => "Novembro", 12 => "Dezembro");
$diasdasemana = array (1 => "Segunda-Feira",2 => "Terça-Feira",3 => "Quarta-Feira",4 => "Quinta-Feira",5 => "Sexta-Feira",6 => "Sábado",0 => "Domingo");
$hoje = getdate();
$dia = $hoje["mday"];
$mes = $hoje["mon"];
$nomemes = $meses[$mes];
$ano = $hoje["year"];
$diadasemana = $hoje["wday"];
$nomediadasemana = $diasdasemana[$diadasemana];
echo "$nomediadasemana, $dia de $nomemes de $ano"; ?>
Did you make the code? If yes, you know what the function
getdate
ago?– Woss
Nao Anderson picked up on another forum
– Hemerson Prestes
Then start by studying the function
getdate
and already read about the functionstrtotime
.– Woss
Even without answer I thank you very much !
– Hemerson Prestes
Possible duplicate of How to know if today’s date is Saturday or Sunday (weekend) in PHP?
– Renato Junior