Look at my database:
I'musingthefollowingcode:
<?php$data=$noticia->data_cadastro;setlocale(LC_ALL,"pt_BR", "pt_BR.iso-8859-1", "pt_BR.utf-8", "portuguese");
date_default_timezone_set("America/Sao_Paulo");
echo strftime("%A, %d de %B de %Y", strtotime($data));
?>
Variable contents: $data
: var_dump: "string '09/02/2015 15:55:30' (length=19)"
Returns in the format: "Wednesday, September 02, 2015".
I would like it to return "Monday, February 9, 2015"; and then customize for "09 February 2015", what do I do?
It differs from the post: " Format date in PHP " because where is echo strftime( '%A, %d de %B de %Y', strtotime('today'));
in my case has a variable $date
, simple, but it's making a difference in my case.