Lab 3

/3680_S19/wk3/lab3.php

For this lab, you will generate a shopping catalog by declaring a mutidimensional array of items with keys and values. Each item within the array will be an array of information pertaining to that item. Use the following 'KEYS' for the item: 'NAME', 'IMG', 'DESCRIPTION', 'PRICE', 'RATING','SKU', and 'STOCK'. Have at least 6 or more unique items. Generate the catalog by traversing the items array, and for each item, output the data within a styled inline-block div, 2 items per row. Within each div, display the item in the following format (you may style the div however you'd like to, but the item details must be in this format).

 ---------------------------------------
|    image      |Name: ITEM             |
|    goes       |Rating:* * * * -       |
|    here       |Price: $98.76          |
|    item.png   |SKU:123abc987zyx000    |
|               |In-Stock               |
|---------------------------------------|
|Description: This is the item's        |
|             description               |
|                                       |
 --------------------------------------- 

Assign the RATING value an integer between 0 and 5. Use this value to determine how many full stars and empty stars to output (for a total of 5 stars). If the value is 4, output 4 full stars and the last star empty.

Assign a integer value of 0 or positive for the stock quantity. If the value is positive, echo 'In-Stock' within the division, otherwise echo 'Out Of Stock' in red text color.

The value for the IMG will be a string value for 'path/to/image/file.png' in which you will echo an image tag assiging the src to 'IMG'.

Echo a horizontal rule and a header as "Featured Items". Display the items again, this time sorting in decending order with relation to rating (Highest Rating - Lowest Rating).

Echo a horizontal rule and a header as "Price Low to High". Display the items again, this time sorting in decending order with relation to price (Lowest Price - Highest Price).

(Hint: uasort with callback function)

Have the following assignment within your depository directory and your public_html directory
/3680_S19/wk3/lab3.php