How to get current financial year in PHP

0 votes
With the help of code can anyone explain How to get current financial year in PHP?
Mar 11 in Laravel by Ashutosh
• 23,030 points
93 views

1 answer to this question.

0 votes

You can get the current financial year in PHP using the following code:

$month = date('m');

$year = date('Y');

$financialYear = ($month < 4) ? ($year - 1) . '-' . $year : $year . '-' . ($year + 1);

echo $financialYear;

answered Mar 11 by Sanvi

Related Questions In Laravel

0 votes
1 answer

How to get a variable name as a string in PHP?

Hello @kartik, You can use this: function varName( $v ...READ MORE

answered Sep 29, 2020 in Laravel by Niroj
• 82,840 points
2,692 views
0 votes
1 answer

How to Get the Current URL Inside @if Statement in Laravel?

Hello @kartik, You can use: Request::url() to obtain the current ...READ MORE

answered Nov 11, 2020 in Laravel by Niroj
• 82,840 points
4,190 views
0 votes
1 answer

How to get all the users except current logged in user in laravel eloquent?

Hello @kartik, You can get the current user's ...READ MORE

answered Dec 8, 2020 in Laravel by Niroj
• 82,840 points
7,766 views
0 votes
1 answer

How to identify wheather the request is HTTP GET or HTTP POST in Laravel?

Hey, In order to identify the type of ...READ MORE

answered Mar 19, 2020 in Laravel by Niroj
• 82,840 points
3,445 views
+1 vote
5 answers

How to get user's IP address in Laravel?

Hey, We can get the user's IP address ...READ MORE

answered Mar 20, 2020 in Laravel by Niroj
• 82,840 points
74,777 views
0 votes
1 answer

How to Center a Single-Column Div Within a 12-Column Container in Bootstrap 3?

Using Bootstrap's Offset Classes Bootstrap 3 provides offset ...READ MORE

answered Mar 11 in Node-js by Tanvi
61 views
0 votes
1 answer
0 votes
1 answer

How can you resolve merge conflicts in Git?

To resolve merge conflicts in Git, follow ...READ MORE

answered Dec 17, 2024 in Laravel by Navya
117 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