For many of you who are working on codeigniter, this post can be very useful. Today I will tell you how to get dynamic date(year/months/day) in CodeIgniter 3 project. This date will continue to change automatically. Let’s begin
How to dynamic add date in CodeIgniter 3?
In the image below you can see the date is given in the footer. This date is dynamic, meaning it is not static. This date is obtained through the php date function.
Open footer.php file
Open your footer.php file, then instead of static date, you write this php date function to get dynamic current date(year).
In below code, we usually write date static in php file.
Distributed By <a href=”#” target=”_blank”>YESUUS</a>
But, to show dynamic date using php date function, you can add this little bit of code instead of (2022) or year section. just see below code.
At the End...
I hope this post will definitely help you a lot. thank you so much for your time.