Created
June 18, 2020 16:02
-
-
Save zerobugs-oficial/9d451553d8389c9e9111b9f995ee082c to your computer and use it in GitHub Desktop.
Formatar datas para o formato brasileiro usando PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function data($data){ | |
return date("d/m/Y", strtotime($data)); | |
} | |
// exemplo de utilização: | |
echo data('2017-05-04'); | |
// vai retornar 04/05/2017 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment