Código PHP:
function fecha($fecha)
{
preg_replace( "/([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})/", $fecha, $mifecha);
$lafecha=$mifecha[3]."/".$mifecha[2]."/".$mifecha[1];
return $lafecha;
}
Código PHP:
function fecha($fecha)
{
$dia = substr($fecha, 0, 2);
$mes = substr($fecha, 3, 2);
$ano = substr($fecha, -4);
$fecha = $dia . '/' . $mes . '/' . $ano;
return $fecha;
}
Código PHP:
$mifecha, $dia, $mes, $ano
¿Estoy haciendo algo mal?
![:-S](http://static.forosdelweb.com/fdwtheme/images/smilies/crap.png)
bichomen