想问如何将if语句添加到以下代码中。将if语句添加到PHP/HTML中
它所目前所做的是列表中的所有各自的月/年和组文章的标题下,在此从数据库中新闻报道: 即 2012年5月 - 新闻A,黄页行业资讯 2012年6月 - 新闻中心C 2012年7月 - 新闻D
由于使用了unix日期系统,我们遇到了1970年之前的故事。 我不想改变我们目前使用的系统,因为它“工作”,但是,如果可以找到修复(我试过减去数字......它不工作),或者如果if语句可以添加到下面这段代码,从显示的文章1970年之前创建/组停止文章那么这将是不错的:)
Archive
$news=$session->getNews("","","",1);?>
while($article=mysql_fetch_array($news)){?>
$date = $article['thedate'];
$year = date('Y', $date);
$month = date('F', $date);
?>
=$month." - ".$year;?>
$innernews=$session->getNews("",$month,$year);?>
while($innerarticle=mysql_fetch_array($innernews)){?>
class="active" }?>>=$innerarticle['title']?>
}?>
}?>