Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You have a PHP array called inventory. This array is indexed by keys. The keys are product names and the values are expiration dates. The
You have a PHP array called inventory. This array is indexed by keys. The keys are product names and the values are expiration dates. The expiration dates are in the format MM/DD/YYYY. The array might look something like: $inventory array("Milk" "03/2/2013", "Cheese" "04/02/1990", "flour" "05/06/2027"): Get the current time and create an XHTML table where the first column consists of keys in this array and the second column consists of dates. For each table row write a class attribute with one of 3 values: normal, attention, urgent. The table row should get one of 3 class attributes depending on the date. If the product's expiration date is more than a week away (7 days away in the future), the class attribute's value should be normal. If the product's expiration is 3 days in the future, the class attribute should be attention. If the product is expiring today or has already expired, the class attribute should be urgent
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