Question: Assume that you have a PHP array called $ days. The $ days array contains strings that represent dates with the following format: MM-DD-YYY. For

Assume that you have a PHP array called $ days. The $ days array contains strings that represent dates with the following format: MM-DD-YYY. For example: 05-16-2010. The array $ days might look something like: $ days = array ("05-16-2010", "4-02 1990", "05-06-2007"); Your boss wants you to write code that updates this array keeping the same month and day but fixing the year to be the current year. You may assume that the array is indexed by the usual non-negative integers. a) Write the code to get the current Unix timestamp then use this timestamp with the date function to get the current year. b) Assume that the current year is now in a variable called $ year. Use this variable along with the $days array to rewrite the array with the old days and updated years
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
