how to change the date format to d / m / a in php wamp serves [duplicate]

1

I have created a registration system and data queries for the registry in which I work, however the dates are being displayed in the format a / m / d and I want to change to the national format, but I do not know how to do it. Can someone help me?

    
asked by anonymous 16.05.2018 / 19:39

1 answer

0

With PHP :

$sua_data_atual='2018-05-19';
echo date('d/m/Y' strtotime($sua_data_atual));

Retune 19/05/2018 .

  

Function reference date ()

     

Function reference strtotime ()

    
16.05.2018 / 19:42