Forums / General Discussion / Kevin, kinda OT

Kevin, kinda OT

Python · 2 replies

Kevin, kinda OT
Python
18 years ago
Aug 29, 2006 - 4:18pm
I'm working on a site right now in php. I suddenly remembered that the year in the copyright notice at the bottom of this site wasn't automatically updated after Dec 31st. So if you replace the static 2006 with printf("%s",date('Y')); it will always be correct.
Year
Kevin
18 years ago
Aug 31, 2006 - 6:05pm
Here is the code I currently have on the footer of every page:

<?PHP echo date("Y"); ?>

I prefer the straight "echo" statement to printf since I was never a C programmer. I think I added that code after I forgot to update it last time. There's nothing better than never having to worry about something like that.


Kevin
···
Python
18 years ago
Aug 31, 2006 - 7:47pm
I did learn C/C++ at school. Gee, you study for 6 years, learn C and Java, then you get a job and they make you program in Visual Basic... So, I've been programming in VB and VB.NET the last 5 years. Thank god I have this PHP website that needs a bit of C skills :)
© BandToBand.com
Mapping the Rock 'N Roll genome since 2005