日付が形式である場合はPHPで二つの日付を比較する方法'03_01_12'と'31_12_11'。
私はこのコードを使用しています:
$date1=date('d_m_y');
$date2='31_12_11';
if(strtotime($date1) < strtotime($date2))
echo '1 is small ='.strtotime($date1).','.$date1;
else
echo '2 is small ='.strtotime($date2).','.$date2;
しかし、それは機能しません。