Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

URGENT!!! PHP WORK

URGENT!!! PHP WORK
image text in transcribed
$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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions