I need to use function
inside another function
...
function formata_data( $datacad ){
$datacad = explode(' ', $data);
$datacad = $data[0];
$datacad = explode("-", $data);
$datacad = $data[2]."-".$data[1]."-".$data[0];
return $datacad;
}
Now I have a function list users that need to return the data including data de cadastro
and format it with the created function.
function usuarios(){
// listando usuarios
$datacadastro = ("Y-m-d H:i:s");
$datacadastro = ; //usar a função formata_data para formatar o retorno da data no banco
}