Answered step by step
Verified Expert Solution
Question
1 Approved Answer
$monthDays = array ('January' => 31, 'February' => 28, 'March' => 31, 'April' => 30, 'May' => 31, 'June' => 30, 'July' => 31, 'August'
$monthDays = array ('January' => 31, 'February' => 28, 'March' => 31, 'April' => 30, 'May' => 31, 'June' => 30, 'July' => 31, 'August' => 31, 'September' => 30, 'October' => 31, 'November' => 30, 'December' => 31);
Write a loop (in PHP) that prints out a table of 5 of the number of days in each month (as month days pair) using this array ($monthDays) and the random month names generated using the array_rand() function. Hint: You use a for loop that run 5 times.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started