Question: URGENT!!! PHP WORK

URGENT!!! PHP WORK
URGENT!!! PHP WORK
$shop = [
[ "brand" => "Homemade", "type" => "Dark chocolate", "price" => 2000 ],
[ "brand" => "Grandma's", "type" => "Milk chocolate", "price" => 1500 ],
[ "brand" => "Worldsweet", "type" => "Milk chocolate", "price" => 3000 ],
[ "brand" => "Worldsweet", "type" => "Dark chocolate", "price" => 4000 ],
[ "brand" => "Worldsweet", "type" => "Orange essence", "price" => 4000 ],
[ "brand" => "Homemade", "type" => "Milk chocolate", "price" => 1000 ],
[ "brand" => "Speziale", "type" => "Apple & Cinnamon", "price" => 1000 ]
];
?>
DOCTYPE html>
html lang="en">
head>
meta charset="UTF-8">
meta http-equiv="X-UA-Compatible" content="IE=edge">
meta name="viewport" content="width=device-width, initial-scale=1.0">
link rel="stylesheet" href="index.css">
title>Task 1title>
head>
body>
h1>Task 1: Candiesh1>
body>
html>

Christmas is almost here, and soon - recalling our childhood - we can climb under the tree to get some candy from the tree and eat it in the back corner. That is why it is important what kind of candy we buy. In the file, you will find the registry of a shop selling candies. The array contains the brand, the type, and the price of a candy available in the shop. Based on this, you need to generate the following table: - a. (2 pts) In the furst row of the table, list the different types of candy (type) sold in the store as a table header! - b. (1 pt) In the first column of the following rows of the table, list the different brands of candy sold in the store (brand) as table headers! - c. (1 pt) Sort the types and the brands in ascending alphabetical order! - d. (2 pts) Write the corresponding price in a table cell determined by the brand and type! - e. (1 pt) Give the table cell, containing the price, the or style class, if the given price is the least or most expensive in the table, respectively! - f. (1 pt) In the last column of the table, show the average price of the types of candies from the given brand! Help: you can use c and * functions for a more efficient solution

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!