Lee Posted July 24, 2007 Share Posted July 24, 2007 I want to echo out the copyright at the footer of my page (still a noob). Here's what I have in my vars page. $copyright = '<span class="smallwhite">© 2007 Stone Island Records </span>'; Then I just echo.. <?php echo $copyright; ?> What I really want to do is have php adjust the year for me. So do I have to make 3 variables, one for the copyright symbol, one to display the current year & another to display our name, or is there a simpler way of doing this? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
nicangeli Posted July 24, 2007 Share Posted July 24, 2007 <?php $year = date("Y"); $copyright = '<span class="smallwhite">© ' . $year . ' Stone Island Records </span>'; echo $copyright; ?> Quote Link to comment Share on other sites More sharing options...
piznac Posted July 24, 2007 Share Posted July 24, 2007 May not be the best way,.. but it works <?php $copyright = "<span class=\"smallwhite\">©" . date("Y") . "Stone Island Records </span>"; echo $copyright; ?> Quote Link to comment Share on other sites More sharing options...
Lee Posted July 24, 2007 Author Share Posted July 24, 2007 Thanks guys! Quote Link to comment Share on other sites More sharing options...
keeB Posted July 24, 2007 Share Posted July 24, 2007 <?php $year = Date("Y"); $copyright = '<span class="smallwhite">© $year Stone Island Records </span>'; ?> Quote Link to comment Share on other sites More sharing options...
LiamProductions Posted July 24, 2007 Share Posted July 24, 2007 You could use fread Quote Link to comment Share on other sites More sharing options...
Lee Posted July 24, 2007 Author Share Posted July 24, 2007 Well today I have just built my first ever page using a header, content & footer & using php to call for images e.t.c. And now the copyright too thanks to your help. Totally chuffed Quote Link to comment 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.