php中的结果打印不出来
程序代码如下:<?php$data01="2009/4/30";$data02="2010/4/4";echo"$data01&$data02<br><br>";list...
程序代码如下:
<?php
$data01 = "2009/4/30";
$data02 = "2010/4/4";
echo "$data01 & $data02<br><br>";
list($year,$month,$day) = split('[/.-]',$date01);
$d01=$year.$month.$day;
$d01=intval($d01);
list($year,$month,$day) = split('[/.-]',$date02);
$d02=$year.$month.$day;
$d02=intval($d02);
if($d01>$d02)
echo "$date01>$date02";
else
echo "$date01<$date02";
?>
运行后打印出来是:
2009/4/30 & 2010/4/4
<
我要的结果是:
2009/4/30 & 2010/4/4
2009/4/30 < 2010/4/4
为什么"2009/4/30 < 2010/4/4"打印不出来呢? 展开
<?php
$data01 = "2009/4/30";
$data02 = "2010/4/4";
echo "$data01 & $data02<br><br>";
list($year,$month,$day) = split('[/.-]',$date01);
$d01=$year.$month.$day;
$d01=intval($d01);
list($year,$month,$day) = split('[/.-]',$date02);
$d02=$year.$month.$day;
$d02=intval($d02);
if($d01>$d02)
echo "$date01>$date02";
else
echo "$date01<$date02";
?>
运行后打印出来是:
2009/4/30 & 2010/4/4
<
我要的结果是:
2009/4/30 & 2010/4/4
2009/4/30 < 2010/4/4
为什么"2009/4/30 < 2010/4/4"打印不出来呢? 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询