Hola claudio piensa_ctp {@} hotmail {.} com
Prueba esto:
<?php
function compara_fechas($fecha1,$fecha2)
{
if (preg_match("/[0-9]{1,2}/[0-9]{1,2}/([0-9][0-9]){1,2}/",$fecha1))
list($dia1,$mes1,$año1)=split("/",$fecha1);
if (preg_match("/[0-9]{1,2}-[0-9]{1,2}-([0-9][0-9]){1,2}/",$fecha1))
list($dia1,$mes1,$año1)=split("-",$fecha1);
if (preg_match("/[0-9]{1,2}/[0-9]{1,2}/([0-9][0-9]){1,2}/",$fecha2))
list($dia2,$mes2,$año2)=split("/",$fecha2);
if (preg_match("/[0-9]{1,2}-[0-9]{1,2}-([0-9][0-9]){1,2}/",$fecha2))
list($dia2,$mes2,$año2)=split("-",$fecha2);
$dif = mktime(0,0,0,$mes1,$dia1,$año1) - mktime(0,0,0, $mes2,$dia2,$año2);
return ($dif);
}
echo '<head>
<title>'.$_SERVER[PHP_SELF].'</title>
</head>
<html>
<body>';
$f1="30/01/1993";
$f2="30-01-1992";
if (compara_fechas($f1,$f2) <0)
echo "$f1 es menor que $f2 <br>";
if (compara_fechas($f1,$f2) >0)
echo "$f1 es mayor que $f2 <br>";
if (compara_fechas($f1,$f2) ==0)
echo "$f1 es igual que $f2 <br>";
echo "<a href=$_SERVER[PHP_SELF]>Recargar la Página</a>";
echo '</body>
</html>';
?>