How do I use PHP to get the current year

0 votes

I want to put a copyright notice in the footer of a website, but I think it's incredibly tacky for the year to be outdated.

How would I make the year update automatically with PHP 4 or PHP 5?

Jun 9, 2022 in PHP by Kichu
• 19,050 points
361 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer

How Do I Get the Query Builder to Output Its Raw SQL Query as a String?

Hello @kartik, Use the toSql() method on a QueryBuilder instance. DB::table('users')->toSql() would return: select * ...READ MORE

answered Jul 22, 2020 in PHP by Niroj
• 82,880 points
830 views
0 votes
1 answer

How do I get the base URL with PHP?

Hello @kartik, Try this: <?php echo "http://" . $_SERVER['SERVER_NAME'] ...READ MORE

answered Sep 15, 2020 in PHP by Niroj
• 82,880 points
20,289 views
0 votes
1 answer

How do I get the HTML code of a web page in PHP?

Hello @kartik, If your PHP server allows url ...READ MORE

answered Oct 6, 2020 in PHP by Niroj
• 82,880 points
7,838 views
0 votes
1 answer

How do I get the last inserted ID of a MySQL table in PHP?

Hello @kartik, If you're using PDO, use PDO::lastInsertId. If you're ...READ MORE

answered Oct 22, 2020 in PHP by Niroj
• 82,880 points
1,945 views
0 votes
1 answer

How to get the http headers from current request in PHP?

Hello, Try this code: if (!function_exists('getallheaders')) { ...READ MORE

answered Nov 23, 2020 in PHP by Niroj
• 82,880 points
2,415 views
0 votes
1 answer

How to get the client IP address in PHP ?

Hello, Here is a code sample of a good ...READ MORE

answered Apr 8, 2020 in PHP by Niroj
• 82,880 points
6,521 views
0 votes
0 answers

Need XAMPP with PHP 5.4 version - windows

Can someone please share with me any ...READ MORE

Jun 21, 2022 in PHP by narikkadan
• 63,420 points
847 views
0 votes
1 answer

Enabling SEO Optimizer in Magento 1.7 returns 404 error page on frontend links

Modified Magento's stock .htaccess to fit my ...READ MORE

answered Feb 10, 2022 in Others by narikkadan
• 63,420 points
392 views
0 votes
1 answer

Convert a date format in PHP

Use strtotime() and date(): $originalDate = "2010-03-21"; $newDate ...READ MORE

answered Feb 17, 2022 in Others by Aditya
• 7,680 points
3,396 views
0 votes
1 answer

BITCOIN payments, OP_RETURN parameter

Try doing the server side via encrypted ...READ MORE

answered Mar 24, 2022 in Blockchain by Rahul
• 9,670 points
492 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP