macattack Posted August 21, 2008 Share Posted August 21, 2008 Hello, I am making a remarkably simple error that I cannot detect in the following code: print ("<h6>Copyright © 2008"); if (!date("Y") == '2008'){ echo "-".date("Y"); echo "test"; } print (" <a href='mailto:[email protected]'>My Name</a>, all rights reserved."); I'm trying to have it automatically display 2008-present automatically, and I added the "test" portion to see if the if statement is being properly executed — it isn't. If someone knows what I did wrong and could help me, that would be great. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/120714-solved-issue-with-copyright-message-based-on-date/ Share on other sites More sharing options...
kenrbnsn Posted August 21, 2008 Share Posted August 21, 2008 A not equals is coded as "!=" <?php if (date("Y") != '2008'){ ?> Ken Link to comment https://forums.phpfreaks.com/topic/120714-solved-issue-with-copyright-message-based-on-date/#findComment-622027 Share on other sites More sharing options...
macattack Posted August 21, 2008 Author Share Posted August 21, 2008 Ah that was easy. Thanks! Link to comment https://forums.phpfreaks.com/topic/120714-solved-issue-with-copyright-message-based-on-date/#findComment-622032 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.