Question: using this code add the following steps 3 . First, create a PHP file that stores the inventory information [ 1 0 Marks ] .

using this code add the following steps
3. First, create a PHP file that stores the inventory information [10 Marks].
i. The inventory should be stored as a 2-dimensional associative array (not a numerical array).
Use the product categories (e.g.,Samsung,LG,Sony) as the array keys.
The value of each key should be another associative array, which stores the products under
that category (e.g.,Neo,QLED,Crystal stored under Samsung). The products will
be the array keys, and their values should be the price of the product (e.g.,Neo=>3000).
ii. Remember, do not use the examples of TVs in your assignment.
Choose a different type of product!
iii. Create a function called get_categories, which should return an array containing the
keys of the array from step i. Remember, you can use the array_keys function for this.
iv. Create a function called get_products, which requires a $category parameter.
The function should return an array of products stored under the selected $category.
4. Create a new PHP file, which will be used as the header of the website [4 Marks].
i. This file should add a title to the page (i.e., using the tag under a

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 Programming Questions!