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; ?> Quote 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? Quote Link to comment https://forums.phpfreaks.com/topic/275799-dynamic-copyright/#findComment-1419253 Share on other sites More sharing options...
Solution garevn Posted March 18, 2013 Author Solution Share Posted March 18, 2013 really tnx man I did an if else statement Quote Link to comment https://forums.phpfreaks.com/topic/275799-dynamic-copyright/#findComment-1419266 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.