Would like to ask how to add an if statement into the following code.
What it presently does is list all of the news articles from the database under a title of their respective months/years and groups the articles under this: i.e. May 2012 - News A, News B June 2012 - News C July 2012 - News D
We are having an issue with stories prior to 1970, due to the unix date system being used. I don't wish to change the system that we presently use due to it "working", however, if a fix could be found for this (i've tried minus figures....it doesnt work), OR if an if statement could be added into this code below, that stops articles from being displayed/groups being created for articles pre-1970 then this would be good :)
<h3>Archive</h3>
<? $news=$session->getNews("","","",1);?>
<? while($article=mysql_fetch_array($news)){?>
<?
$date = $article['thedate'];
$year = date('Y', $date);
$month = date('F', $date);
?>
<h4><?=$month." - ".$year;?></h4>
<nav class="small">
<? $innernews=$session->getNews("",$month,$year);?>
<? while($innerarticle=mysql_fetch_array($innernews)){?>
<a href="/news/<?=$innerarticle['ftitle']?>" <? if($title==$innerarticle['ftitle']){?> class="active"<? }?>><?=$innerarticle['title']?></a>
<? }?>
</nav>
<? }?>
<h4>Pre-1970</h4>
<nav class="small">
<a href="#">See More - Currently Unavailable</a>
</nav>
</div>
