Jump to content

function for copyright date


Recommended Posts

I'm having an issue with this function:

 

function copyyear($setyear){
$year = date('Y');
$copyrightdate="© ".$setyear;
if($year!=$setyear){
$copyrightdate.=" - ".$year."";
}
return $copyrightdate;
}

 

I'm echoing out the function here:

 

<?php echo copyyear("2011"); ?> Ghost Hunter's Portal, L.L.C.

 

This is resulting in:

 

"Ghost Hunter's Portal, L.L.C." with no date in front of it.

Link to comment
https://forums.phpfreaks.com/topic/238848-function-for-copyright-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.