garevn Posted March 18, 2013 Share Posted March 18, 2013 I am using this code and the result is "© Copyright 2013 - 2013". I want if possible if the current year is the same with the copyright year to display only one. for example the display will be "© Copyright 2013". <?php $time = time () ; $year= date("Y",$time); echo "© Copyright 2013 - " . $year; ?> Link to comment https://forums.phpfreaks.com/topic/275799-dynamic-copyright/ Share on other sites More sharing options...
requinix Posted March 18, 2013 Share Posted March 18, 2013 Well you do say "Copyight 2013 - " right there in the code so of course that's what it will output. So how about you output the " - YYYY" only if that year is above 2013? Link to comment https://forums.phpfreaks.com/topic/275799-dynamic-copyright/#findComment-1419253 Share on other sites More sharing options...
garevn Posted March 18, 2013 Author Share Posted March 18, 2013 really tnx man I did an if else statement Link to comment https://forums.phpfreaks.com/topic/275799-dynamic-copyright/#findComment-1419266 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.