| | |||||
| ||||||||
| CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Mar 2006
Posts: 227
![]() ![]() ![]() | Auto Update Copyright [PHP] Have you ever made a site and always had to change the copyright? Well you came to the right place! Here is a PHP code which will automatically update to the current year ![]() <?PHP $date = date('Y'); echo ("Copyrighted 1950 - $date"); ?> What that script does it, it outputs the current date! More tutorials coming soon at: http://www.netsuhi.com |
| |
| | #2 (permalink) |
| Senior Member Join Date: Aug 2003 Location: Chicago Burbs
Posts: 1,111
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Very useful thanks.
__________________ Website Scripts - The Best Scripts on the Web Follow Scripteen on Facebook! Join the Scripteen Mailing List for exclusive script discounts & updates! |
| |
| | #4 (permalink) |
| Senior Member Join Date: Sep 2005 Location: Herts, UK
Posts: 3,806
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Just a note, you don't need brackets round echo tags in php4+ e.g: PHP Code:
__________________ Disney World Fans - Mobile Apps for your WDW Vacation! WSDReg - Affordable Domain Registration. Serving NP members since 2006! Hotel Site Script - 15% Discount for NP members with code 'NPROS' |
| |
| | #7 (permalink) |
| Senior Member Join Date: Dec 2006 Location: England
Posts: 1,565
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | rmwebs, i don't think it is since php4. echo is and also has been a language construct which do not require parenthesis. To my knowledge is it not version dependent. Dan, now you're just being picky lol! technically.... PHP Code: |
| |
| | #8 (permalink) |
| Buy my domains. Join Date: Feb 2006
Posts: 2,792
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | PHP Code: |
| |
| | #11 (permalink) | ||||
| Senior Member Join Date: Dec 2006 Location: England
Posts: 1,565
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| ||||
| |
| | #13 (permalink) |
| Senior Member Join Date: Dec 2006 Location: England
Posts: 1,565
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Let us think of compatibility jromentan! What if short_open_tag is disabled lol. Anyway, that will work for all versions of php, not just php5+. Also it can be beaten lol! Remember just how important those bytes ares ![]() PHP Code: |
| |
| | #15 (permalink) | ||||
| Senior Member Join Date: Dec 2006
Posts: 4,702
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
__________________ - shockie | ||||
| |