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
• 27,410 points
149 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,735 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,235 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,824 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,470 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
105 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
149 views
0 votes
1 answer

What is the role of the Switch component in React Router v5, and how does it differ from Routes in v6?

Switch Component (React Router v5) Role: Renders the ...READ MORE

answered 3 days ago in Laravel by anonymous
35 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